cvs: php4 /ext/standard/ array.c

[email protected] ("Stanislav Malyshev") Sun, 04 Jun 2000 15:43:04 -0000
Newsgroups php.version4
Message-ID <cvsstas960133384@cvsserver>
stas		Sun Jun  4 08:43:04 2000 EDT

  Modified files:
    /php4/ext/standard	array.c 
  Log:
  \0 is part of they key, but not of the variable
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.49 php4/ext/standard/array.c:1.50
--- php4/ext/standard/array.c:1.49	Fri Jun  2 21:16:46 2000
+++ php4/ext/standard/array.c	Sun Jun  4 08:43:04 2000
@@ -614,7 +614,7 @@
 
 	if (f->nKeyLength) {
 		key1.value.str.val = estrndup(f->arKey, f->nKeyLength);
-		key1.value.str.len = f->nKeyLength;
+		key1.value.str.len = f->nKeyLength-1;
 		key1.type = IS_STRING;
 	} else {
 		key1.value.lval = f->h;
@@ -622,7 +622,7 @@
 	}
 	if (s->nKeyLength) {
 		key2.value.str.val = estrndup(s->arKey, s->nKeyLength);
-		key2.value.str.len = s->nKeyLength;
+		key2.value.str.len = s->nKeyLength-1;
 		key2.type = IS_STRING;
 	} else {
 		key2.value.lval = s->h;