summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Value.cpp')
-rw-r--r--fpdfsdk/src/javascript/JS_Value.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 9f27387d1d..cd5f2518cf 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -678,9 +678,10 @@ int _YearFromTime(double t) {
if (_TimeFromYear(y) <= t) {
while (_TimeFromYear(y + 1) <= t)
y++;
- } else
+ } else {
while (_TimeFromYear(y) > t)
y--;
+ }
return y;
}