From: Zeev Suraski Date: Sat, 3 Jun 2000 02:02:09 +0000 (+0000) Subject: Fix a lambda() bug X-Git-Tag: PRE_EIGHT_BYTE_ALLOC_PATCH~137 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e374f6fd31e72f40da84a36bcb65f491d892320d;p=php Fix a lambda() bug --- diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 42b99a1864..dc36516f04 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -845,7 +845,7 @@ ZEND_FUNCTION(lambda) do { sprintf(function_name, "%clambda_%d", 0, ++EG(lambda_count)); - function_name_length = strlen(function_name); + function_name_length = strlen(function_name+1)+1; } while (zend_hash_add(EG(function_table), function_name, function_name_length+1, func, sizeof(zend_function), NULL)==FAILURE); zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME)); RETURN_STRINGL(function_name, function_name_length, 0);