define.c, bug fix, when undefining more than one udfunc
This commit is contained in:
parent
adc9ee09ce
commit
38ce3b6142
|
|
@ -407,7 +407,7 @@ ntharg(int num, struct pnode *args)
|
||||||
void
|
void
|
||||||
com_undefine(wordlist *wlist)
|
com_undefine(wordlist *wlist)
|
||||||
{
|
{
|
||||||
struct udfunc *udf, *ludf = NULL;
|
struct udfunc *udf, *ludf;
|
||||||
|
|
||||||
if (!wlist)
|
if (!wlist)
|
||||||
return;
|
return;
|
||||||
|
|
@ -416,6 +416,7 @@ com_undefine(wordlist *wlist)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while (wlist) {
|
while (wlist) {
|
||||||
|
ludf = NULL;
|
||||||
for (udf = udfuncs; udf; udf = udf->ud_next) {
|
for (udf = udfuncs; udf; udf = udf->ud_next) {
|
||||||
if (eq(wlist->wl_word, udf->ud_name)) {
|
if (eq(wlist->wl_word, udf->ud_name)) {
|
||||||
if (ludf)
|
if (ludf)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue