1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibRegex: Parse \0 as a zero-byte instead of 0x30 ("0")

This was causing some regexes to trip up. Fixes #6202.
This commit is contained in:
Jelle Raaijmakers 2021-04-09 19:30:23 +02:00 committed by Andreas Kling
parent 2c94c9fa7f
commit db321db5f4
3 changed files with 5 additions and 18 deletions

View file

@ -178,11 +178,9 @@ private:
enum class ReadDigitsInitialZeroState {
Allow,
Disallow,
Require,
};
enum class ReadDigitFollowPolicy {
Any,
DisallowDigit,
DisallowNonDigit,
};
StringView read_digits_as_string(ReadDigitsInitialZeroState initial_zero = ReadDigitsInitialZeroState::Allow, ReadDigitFollowPolicy follow_policy = ReadDigitFollowPolicy::Any, bool hex = false, int max_count = -1);