Subject: 2.0.47c: DestroyFunc & DestroyMenu don't work

From: Tim Phipps <[email-masked]>
Date: Wed, 08 Jul 1998 11:01:49 +0100

Hi All,
	Subject says it all, try the following:

DestroyFunc test
AddToFunc test "I" DestroyFunc testfunc2
AddToFunc test "I" AddToFunc testfunc2 "I" Echo Hello

Then in FvwmTalk try typing "test" a few times and then "testfunc2".

Hope it's an easy one to splat,
Tim.
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Bob Woodside <[email-masked]>
Date: Thu, 09 Jul 1998 00:25:25 -0400 (EDT)

On 08-Jul-98 Tim Phipps wrote:
>       Subject says it all...

        Ok, this patch for 2.0.47d seems to fix both problems.

diff -r -u fvwm-2.0.47d/fvwm/builtins.c fvwm-2.0.47d-patched/fvwm/builtins.c
--- fvwm-2.0.47d/fvwm/builtins.c        Thu Jul  9 00:02:20 1998
+++ fvwm-2.0.47d-patched/fvwm/builtins.c        Thu Jul  9 00:09:44 1998
@@ -550,12 +550,11 @@
   mr = FindPopup(token);
   if (token)
     free(token);
-  while (mr && (mrContinuation = mr->continuation))
+  while (mr)
   {
+    mrContinuation = mr->continuation;
     DestroyMenu(mr);
     mr = mrContinuation;
-    if (mr == NULL)
-      break;
   }
   return;
 }

---

From: Tim Phipps <[email-masked]>
Date: Thu, 09 Jul 1998 09:31:02 +0100

> +    mrContinuation = mr->continuation;

That did it! Just goes to show you can't rely on expression evaluation
to do any useful work 8-).

Are there any more of these type of bugs in the code?

Cheers,
Tim.