diff options
Diffstat (limited to 'source/html')
-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) { |