diff --git a/CHANGES.current b/CHANGES.current index e91dc817c..c8193186b 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,10 @@ Version 1.3.30 (in progress) ============================ +05/05/2006: olly + [php] Fix wrappers generated for global 'char' variables to not + include a terminating zero in the PHP string. + 05/03/2006: wsfulton Modify typemaps so that char * can be applied to unsigned char * or signed char * types and visa versa. diff --git a/Lib/php4/globalvar.i b/Lib/php4/globalvar.i index ba06df7da..3ffd7a2bf 100644 --- a/Lib/php4/globalvar.i +++ b/Lib/php4/globalvar.i @@ -68,8 +68,8 @@ c[0] = $1; c[1] = 0; z_var->type = IS_STRING; - z_var->value.str.val = estrdup(c); - z_var->value.str.len = 2; + z_var->value.str.val = estrndup(c, 1); + z_var->value.str.len = 1; zend_hash_add(&EG(symbol_table), "$1", strlen("$1")+1, (void *)&z_var, sizeof(zval *), NULL); }