X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ztest%2Fread-marc.c;h=09fecc7dd3f5a7bda3db21826ff42353cfd86e84;hb=cad33850686850356e9c7da4591abf9cab3193a2;hp=5f0f79ef0a589387759aade7114057197d585452;hpb=379504a233e3e2cc85bca1e7b6d864f1395aec7c;p=yaz-moved-to-github.git diff --git a/ztest/read-marc.c b/ztest/read-marc.c index 5f0f79e..09fecc7 100644 --- a/ztest/read-marc.c +++ b/ztest/read-marc.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2010 Index Data * See the file LICENSE for details. */ @@ -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];