From 2ce9902d5541bf71521587a073a9c09d36d4c3da Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 25 Jan 2010 11:59:04 +0100 Subject: [PATCH] Allow any range for dummy MARC --- ztest/read-marc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ztest/read-marc.c b/ztest/read-marc.c index 58cbfc2..09fecc7 100644 --- a/ztest/read-marc.c +++ b/ztest/read-marc.c @@ -1578,6 +1578,9 @@ char *dummy_marc_record (int num, ODR odr) inf = fopen ("dummy-records", "r"); if (!inf) { /* file not there. Get them from fixed array */ + if (num < 1) + return 0; + return marc_records[(num-1) % 24]; if (num < 1 || num > 24) return 0; return marc_records[num-1]; -- 1.7.10.4