diff options
| author | Stanislav Malyshev <stas@php.net> | 2000-06-04 15:43:04 +0000 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2000-06-04 15:43:04 +0000 |
| commit | a23c64ee8bca80eb2efba882782295846f5cd3a8 (patch) | |
| tree | a6be952bff4247bb4b4889c4407cfe60a0221950 | |
| parent | 950e7224ad3d027b0bab191b28ed1d84386b23f0 (diff) | |
| download | php-git-a23c64ee8bca80eb2efba882782295846f5cd3a8.tar.gz | |
\0 is part of they key, but not of the variable
| -rw-r--r-- | ext/standard/array.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 3d5de7021e..0056b78c37 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -614,7 +614,7 @@ static int array_user_key_compare(const void *a, const void *b) 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 @@ static int array_user_key_compare(const void *a, const void *b) } 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; |
