diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-24 23:47:22 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-01-25 13:41:09 +0330 |
commit | 67ce9e28a5f8d800176dd2749f884be8f7f64de2 (patch) | |
tree | 0a753b34c2d7a3dad11097fac81fc4c522fee5e3 /Userland/Utilities | |
parent | d49d2c7ec4cbe2c0792cf112055a6f5eca79dd63 (diff) | |
download | serenity-67ce9e28a5f8d800176dd2749f884be8f7f64de2.zip |
AK: Standardize the behaviour of GenericLexer::consume_until overloads
Before this commit all consume_until overloads aside from the Predicate
one would consume (and ignore) the stop char/string, while the
Predicate overload would not, in order to keep behaviour consistent,
the other overloads no longer consume the stop char/string as well.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/lsof.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Utilities/lsof.cpp b/Userland/Utilities/lsof.cpp index 2646173dac..ab6fd4f1c4 100644 --- a/Userland/Utilities/lsof.cpp +++ b/Userland/Utilities/lsof.cpp @@ -31,6 +31,7 @@ static bool parse_name(StringView name, OpenFile& file) { GenericLexer lexer(name); auto component1 = lexer.consume_until(':'); + lexer.ignore(); if (lexer.tell_remaining() == 0) { file.name = component1; @@ -50,6 +51,7 @@ static bool parse_name(StringView name, OpenFile& file) } auto component3 = lexer.consume_until(')'); + lexer.ignore(); if (lexer.tell_remaining() != 0) { dbgln("parse_name: expected EOF"); return false; |