1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:17:44 +00:00

LibWeb: Fix comparing current position to quote in Mime Type quote parse

Had a look over this with a fresh head and noticed I was comparing the
current lexer position to the quote character, oops!
This commit is contained in:
Luke Wilde 2022-02-12 16:42:05 +00:00 committed by Linus Groh
parent 497dd5b354
commit d1c4a94659

View file

@ -129,7 +129,7 @@ Optional<MimeType> MimeType::from_string(StringView string)
String parameter_value; String parameter_value;
// 8. If the code point at position within input is U+0022 ("), then: // 8. If the code point at position within input is U+0022 ("), then:
if (lexer.tell() == '"') { if (lexer.peek() == '"') {
// 1. Set parameterValue to the result of collecting an HTTP quoted string from input, given position and the extract-value flag. // 1. Set parameterValue to the result of collecting an HTTP quoted string from input, given position and the extract-value flag.
parameter_value = collect_an_http_quoted_string(lexer, Fetch::HttpQuotedStringExtractValue::Yes); parameter_value = collect_an_http_quoted_string(lexer, Fetch::HttpQuotedStringExtractValue::Yes);