mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
AK+Format: Don't cast to size_t when you want u64.
In Serenity, size_t is defined as u32, thus static_cast<size_t>(value) truncates the value.
This commit is contained in:
parent
b445f15131
commit
35a1e12459
4 changed files with 51 additions and 1 deletions
|
@ -368,7 +368,7 @@ void FormatBuilder::put_i64(
|
|||
const auto is_negative = value < 0;
|
||||
value = is_negative ? -value : value;
|
||||
|
||||
put_u64(static_cast<size_t>(value), base, prefix, upper_case, zero_pad, align, min_width, fill, sign_mode, is_negative);
|
||||
put_u64(static_cast<u64>(value), base, prefix, upper_case, zero_pad, align, min_width, fill, sign_mode, is_negative);
|
||||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue