From c211778f5df261b0df737e39d85d0cd6d9ac1ad7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 19 Feb 2001 17:06:40 +0000 Subject: [PATCH] Bug fix: number of records in yaz_range wrongly set to zero. --- ext/yaz/php_yaz.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index 868e487bb2..5f34077675 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -360,10 +360,11 @@ static void handle_records (Yaz_Association t, Z_Records *sr, t->resultSets->recordList->records[i] = 0; if (t->numberOfRecordsRequested + t->resultSetStartPoint-1 > t->resultSets->resultCount) - t->numberOfRecordsRequested = t->resultSets->resultCount - - t->resultSetStartPoint + 1; - t->resultSets->recordList->num_records = - t->numberOfRecordsRequested; + t->resultSets->recordList->num_records = + t->resultSets->resultCount - t->resultSetStartPoint + 1; + else + t->resultSets->recordList->num_records = + t->numberOfRecordsRequested; } if (sr && sr->which == Z_Records_DBOSD) { -- 2.50.1