diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-11-13 12:03:28 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2014-12-03 12:25:51 +0100 |
commit | 2dca8942c2ad00fefdd95133c2620f318ccde1b2 (patch) | |
tree | a65b3f9cdcc97dc38cdc794f312399bb34353efc | |
parent | c90b2253e40cc5646319bcc79e69b1dc7154db92 (diff) | |
download | mupdf-2dca8942c2ad00fefdd95133c2620f318ccde1b2.tar.xz |
html: Create value lists in the correct order.
-rw-r--r-- | source/html/css-parse.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/html/css-parse.c b/source/html/css-parse.c index 28176d14..fe91a933 100644 --- a/source/html/css-parse.c +++ b/source/html/css-parse.c @@ -408,19 +408,20 @@ static struct value *parse_value(struct lexbuf *buf) static struct value *parse_value_list(struct lexbuf *buf) { - struct value *v, *vv; + struct value *head, *tail; - vv = NULL; + head = tail = NULL; while (buf->lookahead != '}' && buf->lookahead != ';' && buf->lookahead != '!' && buf->lookahead != ')' && buf->lookahead != EOF) { - v = parse_value(buf); - v->next = vv; - vv = v; + if (!head) + head = tail = parse_value(buf); + else + tail = tail->next = parse_value(buf); } - return vv; + return head; } static struct property *parse_declaration(struct lexbuf *buf) |