mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 07:01:52 +00:00
Fix sprintf call for "converting parameter .. failed"
``` union _zend_function { zend_uchar type; /* MUST be the first element of this struct! */ uint32_t quick_arg_flags; struct { zend_uchar type; /* never used */ zend_uchar arg_flags[3]; /* bitset of arg_info.pass_by_reference */ uint32_t fn_flags; zend_string *function_name; ```
This commit is contained in:
parent
63d65a59ae
commit
7fd31e8b5a
@ -117,7 +117,7 @@ static void v8js_call_php_func(zend_object *object, zend_function *method_ptr, c
|
||||
{
|
||||
if (v8js_to_zval(info[i], &fci.params[i], ctx->flags, isolate) == FAILURE)
|
||||
{
|
||||
error_len = spprintf(&error, 0, "converting parameter #%d passed to %s() failed", i + 1, method_ptr->common.function_name);
|
||||
error_len = spprintf(&error, 0, "converting parameter #%d passed to %s() failed", i + 1, ZSTR_VAL(method_ptr->common.function_name));
|
||||
|
||||
if (error_len > std::numeric_limits<int>::max()) {
|
||||
zend_throw_exception(php_ce_v8js_exception,
|
||||
|
Loading…
Reference in New Issue
Block a user