From 1556c077878f61f4c8180c786d96313758cc8355 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 8 Nov 2014 22:55:07 +0100 Subject: [PATCH] fix a crash when missing a token --- src/build.h | 2 +- src/kernel/magic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build.h b/src/build.h index 7eb5647df..1ab97b086 100644 --- a/src/build.h +++ b/src/build.h @@ -1,3 +1,3 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 3 -#define VERSION_BUILD 688 +#define VERSION_BUILD 689 diff --git a/src/kernel/magic.c b/src/kernel/magic.c index b609fcff6..ddd53acb0 100644 --- a/src/kernel/magic.c +++ b/src/kernel/magic.c @@ -2579,7 +2579,7 @@ static castorder *cast_cmd(unit * u, order * ord) } s = getstrtoken(); } - if (!s[0] || strlen(s) == 0) { + if (!s || !s[0] || strlen(s) == 0) { /* Fehler "Es wurde kein Zauber angegeben" */ cmistake(u, ord, 172, MSG_MAGIC); return 0;