Fixed notify bug that caused extchat to crash
authorAri Johnson <ari@nveid.com>
Mon, 11 Sep 2006 05:42:50 +0000 (05:42 +0000)
committerAri Johnson <iamtheari@gmail.com>
Thu, 7 Sep 2006 22:22:00 +0000 (22:22 +0000)
(cherry picked from commit 236c76103363888c2227d08b6834907611ad6526)

src/notify.c

index ed1f09d42d0fdc21a40e39f06c9986633df7d57b..da9d6b2bb3684576397c414297c5128a41800d63 100644 (file)
@@ -823,13 +823,14 @@ notify_anything_loc(dbref speaker, na_lookup func,
 
       /* Evaluate the On Contact Message */
       if(flags & NA_EVALONCONTACT) {
-       wsave[j] = global_eval_context.wenv[j];
+       for (j = 0; j < 10; j++)
+         wsave[j] = global_eval_context.wenv[j];
        global_eval_context.wenv[0] = msgbuf;
        for (j = 1; j < 10; j++)
          global_eval_context.wenv[j] = NULL;
        bp = eocm;
-       process_expression(eocm, &bp, (const char **) &msgbuf, target, speaker, speaker,
-           PE_DEFAULT, PT_DEFAULT, NULL);
+       process_expression(eocm, &bp, (const char **) &msgbuf, target, speaker,
+                          speaker, PE_DEFAULT, PT_DEFAULT, NULL);
        *bp = 0;
        for (j = 0; j < 10; j++)
          global_eval_context.wenv[j] = wsave[j];