From: Adam Dickmeiss Date: Mon, 25 Jan 2010 10:59:04 +0000 (+0100) Subject: Allow any range for dummy MARC X-Git-Tag: v4.0.1~11 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=2ce9902d5541bf71521587a073a9c09d36d4c3da;p=yaz-moved-to-github.git Allow any range for dummy MARC --- 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];