1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 01:18:19 +02:00

- Make increment of "" become "1"

This commit is contained in:
Andi Gutmans
2000-10-13 16:24:00 +00:00
parent 545ae277bc
commit bc37c9b1cd
+7
View File
@@ -1339,6 +1339,13 @@ static void increment_string(zval *str)
int last=0; /* Shut up the compiler warning */
int ch;
if (str->value.str.len == 0) {
STR_FREE(str->value.str.val);
str->value.str.val = estrndup("1", sizeof("1")-1);
str->value.str.len = 1;
return;
}
while(pos >= 0) {
ch = s[pos];
if (ch >= 'a' && ch <= 'z') {