summaryrefslogtreecommitdiffhomepage
path: root/src/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/numeric.c')
-rw-r--r--src/numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/numeric.c b/src/numeric.c
index d09213235..e081cf80a 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -169,7 +169,7 @@ mrb_flo_to_str(mrb_state *mrb, mrb_value flo)
e = TRUE;
n = n / pow(10.0, exp);
if (isinf(n)) {
- if (s[0] == '-') {
+ if (s < c) { /* s[0] == '-' */
return mrb_str_new_lit(mrb, "-0.0");
}
else {