summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bcmath/libbcmath/src')
-rw-r--r--ext/bcmath/libbcmath/src/str2num.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/bcmath/libbcmath/src/str2num.c b/ext/bcmath/libbcmath/src/str2num.c
index ef505e86e1..62544de80e 100644
--- a/ext/bcmath/libbcmath/src/str2num.c
+++ b/ext/bcmath/libbcmath/src/str2num.c
@@ -105,5 +105,8 @@ bc_str2num (bc_num *num, char *str, int scale)
for (;strscale > 0; strscale--)
*nptr++ = CH_VAL(*ptr++);
}
+
+ if (bc_is_zero (*num))
+ (*num)->n_sign = PLUS;
}