From: Rick Bird Date: Thu, 12 May 2011 02:00:12 +0000 (-0400) Subject: Fixed crash bug in @event when event obj/atr pair was given wrongly X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=5d5993036d7a5034b150f25fc63ec4650a5cbe41;p=cobramush.git Fixed crash bug in @event when event obj/atr pair was given wrongly --- diff --git a/src/modules.c b/src/modules.c index 2765566..1429304 100644 --- a/src/modules.c +++ b/src/modules.c @@ -225,13 +225,14 @@ COMMAND(cmd_event) } s = strchr(arg_right, '/'); - *s++ = '\0'; - if (!s) { + if (!s || !*s) { notify(player, "Bad Event format"); return; } + *s++ = '\0'; + thing = match_thing(player, arg_right); if (!GoodObject(thing)) return;