Skip to content

Commit

Permalink
- Commit Thies' patch. str.len was too long.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Gutmans committed Jul 10, 2001
1 parent 45d71e2 commit 6297cd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6297cd2

Please sign in to comment.