Browse Source

wlist.c, wl_find(), avoid crash when `string' argument is NULL

pre-master-46
rlar 10 years ago
parent
commit
52a1a58e14
  1. 3
      src/misc/wlist.c

3
src/misc/wlist.c

@ -347,6 +347,9 @@ wl_chop_rest(wordlist *wl)
wordlist *
wl_find(const char *string, const wordlist *wl)
{
if (!string)
return NULL;
for (; wl; wl = wl->wl_next)
if (eq(string, wl->wl_word))
break;

Loading…
Cancel
Save