diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-05-07 12:12:26 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-05-07 12:12:26 +0200 |
commit | 3a65be71bb296077d4cc90cf5ec13dd55fb0d4c5 (patch) | |
tree | b69e8075b4ec54f4aac63efa25866e3da38937f3 /source | |
parent | 8f6009db363f9978f22826a413bbd0f7f0ddd2f9 (diff) | |
download | mupdf-3a65be71bb296077d4cc90cf5ec13dd55fb0d4c5.tar.xz |
epub: Fix typo when parsing negative numbers.
Diffstat (limited to 'source')
-rw-r--r-- | source/html/css-parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/html/css-parse.c b/source/html/css-parse.c index f2faef4a..b672dc27 100644 --- a/source/html/css-parse.c +++ b/source/html/css-parse.c @@ -508,11 +508,11 @@ static fz_css_value *parse_term(struct lexbuf *buf) { fz_css_value *v; - if (buf->c == '+' || buf->c == '-') + if (buf->lookahead == '+' || buf->lookahead == '-') { - float sign = buf->c == '-' ? -1 : 1; + float sign = buf->lookahead == '-' ? -1 : 1; next(buf); - if (buf->lookahead != CSS_NUMBER || buf->lookahead != CSS_LENGTH || buf->lookahead != CSS_PERCENT) + if (buf->lookahead != CSS_NUMBER && buf->lookahead != CSS_LENGTH && buf->lookahead != CSS_PERCENT) fz_css_error(buf, "expected number"); if (sign < 0) { |