diff options
Diffstat (limited to 'src/libserver/css/css_tokeniser.cxx')
-rw-r--r-- | src/libserver/css/css_tokeniser.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libserver/css/css_tokeniser.cxx b/src/libserver/css/css_tokeniser.cxx index ace94cae2..f3c010f1e 100644 --- a/src/libserver/css/css_tokeniser.cxx +++ b/src/libserver/css/css_tokeniser.cxx @@ -557,7 +557,13 @@ auto css_tokeniser::next_token(void) -> struct css_parser_token case '"': case '\'': offset = i + 1; - return make_token<css_parser_token::token_type::string_token>(consume_string(c)); + if (offset < input.size()) { + return make_token<css_parser_token::token_type::string_token>(consume_string(c)); + } + else { + /* Unpaired quote at the end of the rule */ + return make_token<css_parser_token::token_type::delim_token>(c); + } case '(': offset = i + 1; return make_token<css_parser_token::token_type::obrace_token>(); |