From 59c5c55d679246f3624a5430d0c4e4560c220cd2 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 30 Jul 2009 14:43:28 +0000 Subject: Fix processing of quotes bytecode during cascade. svn path=/trunk/libcss/; revision=8912 --- src/select/properties.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/select/properties.c b/src/select/properties.c index 8959ad8..4b7b8a7 100644 --- a/src/select/properties.c +++ b/src/select/properties.c @@ -4049,14 +4049,17 @@ css_error cascade_quotes(uint32_t opv, css_style *style, value = CSS_QUOTES_STRING; while (v != QUOTES_NONE) { - lwc_string *quote; + lwc_string *open, *close; lwc_string **temp; - quote = *((lwc_string **) style->bytecode); - advance_bytecode(style, sizeof(quote)); + open = *((lwc_string **) style->bytecode); + advance_bytecode(style, sizeof(lwc_string *)); + + close = *((lwc_string **) style->bytecode); + advance_bytecode(style, sizeof(lwc_string *)); temp = state->result->alloc(quotes, - (n_quotes + 1) * sizeof(lwc_string *), + (n_quotes + 2) * sizeof(lwc_string *), state->result->pw); if (temp == NULL) { if (quotes != NULL) { @@ -4068,9 +4071,8 @@ css_error cascade_quotes(uint32_t opv, css_style *style, quotes = temp; - quotes[n_quotes] = quote; - - n_quotes++; + quotes[n_quotes++] = open; + quotes[n_quotes++] = close; v = *((uint32_t *) style->bytecode); advance_bytecode(style, sizeof(v)); -- cgit v1.2.3