mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 08:18:55 +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: 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))
|
if constexpr (sizeof(T) > sizeof(size_t))
|
||||||
VERIFY(value < NumericLimits<size_t>::max());
|
VERIFY(value < NumericLimits<size_t>::max());
|
||||||
if constexpr (IsSigned<T>)
|
if constexpr (IsSigned<T>)
|
||||||
VERIFY(value > 0);
|
VERIFY(value >= 0);
|
||||||
return static_cast<size_t>(value);
|
return static_cast<size_t>(value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue