mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Make CheckedFormatString pass the char array size to StringView
This makes the assumption that we never pass a stack-allocated char array to CheckedFormatString arguments (dbgln, outln, warnln). This assumption seems to hold true for the current state of Serenity code, at least. :^)
This commit is contained in:
parent
4771917184
commit
52d017c611
Notes:
sideshowbarker
2024-07-17 09:28:11 +09:00
Author: https://github.com/sin-ack Commit: https://github.com/SerenityOS/serenity/commit/52d017c611 Pull-request: https://github.com/SerenityOS/serenity/pull/14555 Reviewed-by: https://github.com/Dexesttp ✅ Reviewed-by: https://github.com/kleinesfilmroellchen
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ template<typename... Args>
|
|||
struct CheckedFormatString {
|
||||
template<size_t N>
|
||||
consteval CheckedFormatString(char const (&fmt)[N])
|
||||
: m_string { fmt }
|
||||
: m_string { fmt, N - 1 }
|
||||
{
|
||||
#ifdef ENABLE_COMPILETIME_FORMAT_CHECK
|
||||
check_format_parameter_consistency<N, sizeof...(Args)>(fmt);
|
||||
|
|
Loading…
Reference in a new issue