summaryrefslogtreecommitdiff
path: root/source/pdf/js/util.js
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-06-15 15:34:55 +0200
committerRobin Watts <robin.watts@artifex.com>2018-06-22 16:48:45 +0100
commit2daa34ef06b621414946006314cb262a474b1203 (patch)
treee4135dd62aaf7780482c8fa076669b4bef16cb5c /source/pdf/js/util.js
parent072703ee156c94cd951cf2c406f4ff64e2ed094f (diff)
downloadmupdf-2daa34ef06b621414946006314cb262a474b1203.tar.xz
Fix error check in AFPercent_Format to look for null rather than false.
The number 0 is a valid percentage number.
Diffstat (limited to 'source/pdf/js/util.js')
-rw-r--r--source/pdf/js/util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/js/util.js b/source/pdf/js/util.js
index c634f781..ce60ec43 100644
--- a/source/pdf/js/util.js
+++ b/source/pdf/js/util.js
@@ -860,7 +860,7 @@ function AFPercent_Keystroke(nDec, sepStyle) {
function AFPercent_Format(nDec, sepStyle) {
var val = AFMakeNumber(event.value);
- if (!val) {
+ if (val == null) {
event.value = '';
return;
}