mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 20:33:10 +00:00
LibWeb: Dont try to fetch another token in an+b parsing
When parsing <ndash-dimension> <signless-integer>, we tried to parse a new token from the stream instead of using the value we had already extracted. This caused pages that used the syntax to crash.
This commit is contained in:
parent
303b72d516
commit
5ca8e2a751
|
@ -5327,7 +5327,7 @@ Optional<Selector::SimpleSelector::ANPlusBPattern> Parser::parse_a_n_plus_b_patt
|
|||
auto& second_value = values.next_token();
|
||||
if (is_signless_integer(second_value)) {
|
||||
int a = first_value.token().dimension_value_int();
|
||||
int b = -values.next_token().token().to_integer();
|
||||
int b = -second_value.token().to_integer();
|
||||
transaction.commit();
|
||||
return Selector::SimpleSelector::ANPlusBPattern { a, b };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue