From aeeed33700f5c647c8c5b4f9db6b112a70cb0467 Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Mon, 11 Sep 2006 06:13:11 +0000 Subject: [PATCH] Fixed second notify bug that caused the chat system to crash --- game/txt/changes.txt | 1 + src/notify.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/game/txt/changes.txt b/game/txt/changes.txt index 8deadf7..023fe48 100644 --- a/game/txt/changes.txt +++ b/game/txt/changes.txt @@ -14,6 +14,7 @@ CobraMUSH Version 0.72p1 * Hints for mysql in linux added. Fixes odd cases where mysql isn't detected on certain servers. [RLB] * Fixed notify bug that caused the chat system to crash [AEJ] + * Fixed second notify bug that caused the chat system to crash [AEJ] & 0.72 CobraMUSH Version 0.72 diff --git a/src/notify.c b/src/notify.c index da9d6b2..12ac490 100644 --- a/src/notify.c +++ b/src/notify.c @@ -823,14 +823,15 @@ notify_anything_loc(dbref speaker, na_lookup func, /* Evaluate the On Contact Message */ if(flags & NA_EVALONCONTACT) { + const char *tmpbuf = msgbuf; 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, &tmpbuf, target, speaker, speaker, + PE_DEFAULT, PT_DEFAULT, NULL); *bp = 0; for (j = 0; j < 10; j++) global_eval_context.wenv[j] = wsave[j]; -- 2.30.2