X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=dict%2Fscan.c;h=01be13e1af2c6c0ec6fe291182c722ed305a50d2;hb=d07818ca27f4e0efc9683148cb5d9891d34b9495;hp=d0bcaf73f12a8f9c4f0e6de0e04aebeb665a6874;hpb=b5af7db2dbda2c0a8e705c58da25a50f56214265;p=idzebra-moved-to-github.git diff --git a/dict/scan.c b/dict/scan.c index d0bcaf7..01be13e 100644 --- a/dict/scan.c +++ b/dict/scan.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: scan.c,v $ - * Revision 1.6 1995-11-20 11:58:04 adam + * Revision 1.7 1995-12-11 09:04:50 adam + * Bug fix: the lookup/scan/lookgrep didn't handle empty dictionary. + * + * Revision 1.6 1995/11/20 11:58:04 adam * Support for YAZ in standard located directories, such as /usr/local/.. * * Revision 1.5 1995/10/09 16:18:32 adam @@ -196,6 +199,8 @@ int dict_scan (Dict dict, Dict_char *str, int *before, int *after, int (*f)(Dict_char *name, const char *info, int pos, void *client)) { + if (dict->head.last <= 1) + return 0; return dict_scan_r (dict, 1, 0, str, before, after, client, f); }