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

- Commit Thies' patch. str.len was too long.

This commit is contained in:
Andi Gutmans
2001-07-10 05:02:50 +00:00
parent 45d71e2951
commit 6297cd26e2
+2 -2
View File
@@ -49,8 +49,8 @@ static void build_runtime_defined_function_key(zval *result, zval *name, zend_op
}
/* NULL, name length, filename length, line number length */
result->value.str.len = 1+name->value.str.len+strlen(filename)+lineno_len+1;
result->value.str.val = (char *) emalloc(result->value.str.len); /* Extra null byte is calculated a line before */
result->value.str.len = 1+name->value.str.len+strlen(filename)+lineno_len;
result->value.str.val = (char *) emalloc(result->value.str.len+1);
sprintf(result->value.str.val, "%c%s%s%s", '\0', name->value.str.val, filename, lineno_buf);
result->type = IS_STRING;
result->refcount = 1;