From: Adam Dickmeiss Date: Mon, 19 Feb 2001 17:06:40 +0000 (+0000) Subject: Bug fix: number of records in yaz_range wrongly set to zero. X-Git-Tag: php-4.0.5RC1~241 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c211778f5df261b0df737e39d85d0cd6d9ac1ad7;p=php Bug fix: number of records in yaz_range wrongly set to zero. --- 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) {