From 211d712c5910dc8a21e364d53323d9aad0aa3d7e Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sat, 29 Dec 2001 20:47:25 +0000 Subject: [PATCH] @ Fix bug in krsort() where an extra character was being compared (Andi) - Fix bug in krsort() where an extra character was being compared (Andi) --- ext/standard/array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/array.c b/ext/standard/array.c index 1b0ea251ba..653851b4c8 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -137,7 +137,7 @@ static int array_key_compare(const void *a, const void *b TSRMLS_DC) } else { Z_TYPE(first) = IS_STRING; Z_STRVAL(first) = f->arKey; - Z_STRLEN(first) = f->nKeyLength; + Z_STRLEN(first) = f->nKeyLength-1; } if (s->nKeyLength == 0) { @@ -146,7 +146,7 @@ static int array_key_compare(const void *a, const void *b TSRMLS_DC) } else { Z_TYPE(second) = IS_STRING; Z_STRVAL(second) = s->arKey; - Z_STRLEN(second) = s->nKeyLength; + Z_STRLEN(second) = s->nKeyLength-1; } if (ARRAYG(compare_func)(&result, &first, &second TSRMLS_CC) == FAILURE) { -- 2.50.1