Index: fpdfsdk/src/javascript/JS_Value.cpp |
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp |
index 9f27387d1d3e80efef8af3d6b63139f3b0701677..cd5f2518cf04d6f94c53c0adcaa9ef6e1ff94567 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; |
} |