summaryrefslogtreecommitdiff
path: root/ext/standard/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/math.c')
-rw-r--r--ext/standard/math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c
index a8dec98310..28ca255721 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -718,7 +718,7 @@ _php_math_basetozval(zval *arg, int base, zval *ret) {
s = Z_STRVAL_P(arg);
- for (i = Z_STRLEN_P(arg); i >= 0; i--) {
+ for (i = Z_STRLEN_P(arg); i > 0; i--) {
c = *s++;
digit = (c >= '0' && c <= '9') ? c - '0'