Skip to content

Commit 3226913

Browse files
byrootnobu
andcommitted
Explicit cast down from double to int
Co-Authored-By: Nobuyoshi Nakada <[email protected]>
1 parent f9ed820 commit 3226913

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/json/ext/vendor/fpconv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static Fp find_cachedpow10(int exp, int* k)
9292
{
9393
const double one_log_ten = 0.30102999566398114;
9494

95-
int approx = -(exp + npowers) * one_log_ten;
95+
int approx = (int)(-(exp + npowers) * one_log_ten);
9696
int idx = (approx - firstpower) / steppowers;
9797

9898
while(1) {

0 commit comments

Comments
 (0)