X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=ztest%2Fread-marc.c;h=09fecc7dd3f5a7bda3db21826ff42353cfd86e84;hp=58cbfc2625f76f36aab6ca7e9e85996d4c6e9a9f;hb=2ce9902d5541bf71521587a073a9c09d36d4c3da;hpb=8d297aab170c07e64ed6d1c0b817e13399f068d2 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];