diff --git a/Libraries/LibGUI/CppLexer.cpp b/Libraries/LibGUI/CppLexer.cpp index 74cc9bd245..e5918604bc 100644 --- a/Libraries/LibGUI/CppLexer.cpp +++ b/Libraries/LibGUI/CppLexer.cpp @@ -287,11 +287,8 @@ Vector CppLexer::lex() } case 'x': { size_t hex_digits = 0; - for (size_t i = 0; i < 2; ++i) { - if (!isxdigit(peek(2 + i))) - break; + while (isxdigit(peek(2 + hex_digits))) ++hex_digits; - } return 2 + hex_digits; } case 'u':