mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Allow zero-valued signed size types in format strings
This commit is contained in:
parent
61f4914d6e
commit
a2ef168d75
Notes:
sideshowbarker
2024-07-17 21:11:12 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/a2ef168d75 Pull-request: https://github.com/SerenityOS/serenity/pull/17460 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ struct TypeErasedParameter {
|
|||
if constexpr (sizeof(T) > sizeof(size_t))
|
||||
VERIFY(value < NumericLimits<size_t>::max());
|
||||
if constexpr (IsSigned<T>)
|
||||
VERIFY(value > 0);
|
||||
VERIFY(value >= 0);
|
||||
return static_cast<size_t>(value);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue