Skip to content

Commit eed803a

Browse files
author
James McLaughlin
committed
Un-ambiguate pow call in the case of C++ overloaded pow
1 parent dc844af commit eed803a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

json.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ json_value * json_parse_ex (json_settings * settings,
797797
goto e_failed;
798798
}
799799

800-
top->u.dbl += ((double) num_fraction) / (pow (10, (double) num_digits));
800+
top->u.dbl += ((double) num_fraction) / (pow (10.0, (double) num_digits));
801801
}
802802

803803
if (b == 'e' || b == 'E')
@@ -823,7 +823,7 @@ json_value * json_parse_ex (json_settings * settings,
823823
goto e_failed;
824824
}
825825

826-
top->u.dbl *= pow (10, (double)
826+
top->u.dbl *= pow (10.0, (double)
827827
(flags & flag_num_e_negative ? - num_e : num_e));
828828
}
829829

0 commit comments

Comments
 (0)