From 3a65be71bb296077d4cc90cf5ec13dd55fb0d4c5 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 7 May 2015 12:12:26 +0200 Subject: epub: Fix typo when parsing negative numbers. --- source/html/css-parse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/html') 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) { -- cgit v1.2.3