summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2022-02-12 16:42:05 +0000
committerLinus Groh <mail@linusgroh.de>2022-02-12 17:13:14 +0000
commitd1c4a94659a221352c3ea1595acbad63f75b1eb1 (patch)
treeb1cd8c9784a958191c154765953a562622d31e85
parent497dd5b35402e67eaac943e88def4d6973ce9ca2 (diff)
downloadserenity-d1c4a94659a221352c3ea1595acbad63f75b1eb1.zip
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!
-rw-r--r--Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp
index c3c36904dd..f52c41204e 100644
--- a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp
+++ b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp
@@ -129,7 +129,7 @@ Optional<MimeType> MimeType::from_string(StringView string)
String parameter_value;
// 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.
parameter_value = collect_an_http_quoted_string(lexer, Fetch::HttpQuotedStringExtractValue::Yes);