diff --git a/libc/src/__support/float_to_string.h b/libc/src/__support/float_to_string.h index 1bb4e5c5b9246..e198a5a7215fb 100644 --- a/libc/src/__support/float_to_string.h +++ b/libc/src/__support/float_to_string.h @@ -548,7 +548,8 @@ class FloatToString { val = POW10_SPLIT_2[p]; #endif - const int32_t shift_amount = SHIFT_CONST + (-exponent - IDX_SIZE * idx); + const int32_t shift_amount = + SHIFT_CONST + (-exponent - static_cast(IDX_SIZE) * idx); uint32_t digits = internal::mul_shift_mod_1e9(mantissa, val, shift_amount); return digits;