cvs: php4 /ext/standard array.c
| From: | Andrei Zmievski | Date: | Mon, 02 Apr 2001 13:20:17 +0000 |
| Subject: | cvs: php4 /ext/standard array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4942@lists.php.net to get a copy of this message | ||
andrei Mon Apr 2 06:20:17 2001 EDT
Modified files:
/php4/ext/standard array.c
Log:
Use correct string length.
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.106 php4/ext/standard/array.c:1.107
--- php4/ext/standard/array.c:1.106 Mon Mar 19 13:20:02 2001
+++ php4/ext/standard/array.c Mon Apr 2 06:20:16 2001
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.106 2001/03/19 21:20:02 andrei Exp $ */
+/* $Id: array.c,v 1.107 2001/04/02 13:20:16 andrei Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -2202,7 +2202,7 @@
switch (zend_hash_get_current_key_ex(target_hash, &string_key, &str_key_len,
&num_key, 1, &pos)) {
case HASH_KEY_IS_STRING:
Z_STRVAL_P(data) = string_key;
- Z_STRLEN_P(data) = str_key_len;
+ Z_STRLEN_P(data) = str_key_len-1;
Z_TYPE_P(data) = IS_STRING;
break;
case HASH_KEY_IS_LONG: