define.c, bug fix, when undefining more than one udfunc

This commit is contained in:
rlar 2012-09-13 21:03:17 +02:00
parent adc9ee09ce
commit 38ce3b6142
1 changed files with 2 additions and 1 deletions

View File

@ -407,7 +407,7 @@ ntharg(int num, struct pnode *args)
void
com_undefine(wordlist *wlist)
{
struct udfunc *udf, *ludf = NULL;
struct udfunc *udf, *ludf;
if (!wlist)
return;
@ -416,6 +416,7 @@ com_undefine(wordlist *wlist)
return;
}
while (wlist) {
ludf = NULL;
for (udf = udfuncs; udf; udf = udf->ud_next) {
if (eq(wlist->wl_word, udf->ud_name)) {
if (ludf)