1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:37:43 +00:00

LibRegex: Allow empty character classes in {B,E}RE

This commit is contained in:
Ali Mohammad Pur 2021-07-13 02:14:09 +04:30 committed by Gunnar Beutner
parent 189922f442
commit 5f4e1338a1

View file

@ -304,11 +304,11 @@ ALWAYS_INLINE bool AbstractPosixParser::parse_bracket_expression(Vector<CompareT
} }
} }
if (values.size()) if (!values.is_empty()) {
match_length_minimum = 1; match_length_minimum = 1;
if (values.first().type == CharacterCompareType::Inverse)
if (values.first().type == CharacterCompareType::Inverse) match_length_minimum = 0;
match_length_minimum = 0; }
return true; return true;
} }