Fixed crash bug in @event when event obj/atr pair was given wrongly
authorRick Bird <nveid@bender.theari.com>
Thu, 12 May 2011 02:00:12 +0000 (22:00 -0400)
committerRick Bird <nveid@bender.theari.com>
Thu, 12 May 2011 02:00:12 +0000 (22:00 -0400)
src/modules.c

index 27655668c558a23bc300cbc35ba1bd8087251eaf..1429304efdc1ccc86e541f4094eecfa9e65e18fe 100644 (file)
@@ -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;