summaryrefslogtreecommitdiff
path: root/ext/yaz/php_yaz.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/yaz/php_yaz.c')
-rw-r--r--ext/yaz/php_yaz.c9
1 files 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)
{