Screwed up when test-suite-only command __cmd was added in commit
e852d45. Should never happen with the intended use. Fix it anyway.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
* testing.c: Commands for test-suite use
*
* Known contributors to this file:
* testing.c: Commands for test-suite use
*
* Known contributors to this file:
- * Markus Armbruster, 2014
+ * Markus Armbruster, 2014-2015
return RET_SYN;
if (!strcmp(p, "added")) {
p = getstarg(player->argp[2], "number? ", buf);
return RET_SYN;
if (!strcmp(p, "added")) {
p = getstarg(player->argp[2], "number? ", buf);
+ if (!p || !*p)
+ return RET_SYN;
test_suite_prng_seed -= strtol(p, NULL, 10);
p = getstarg(player->argp[3], "BTUs? ", buf);
test_suite_prng_seed -= strtol(p, NULL, 10);
p = getstarg(player->argp[3], "BTUs? ", buf);
+ if (!p || !*p)
+ return RET_SYN;
player->btused -= strtol(p, NULL, 10);
p = getstarg(player->argp[4], "money? ", buf);
player->btused -= strtol(p, NULL, 10);
p = getstarg(player->argp[4], "money? ", buf);
+ if (!p)
+ return RET_SYN;
player->dolcost -= strtod(p, NULL);
return RET_OK;
}
player->dolcost -= strtod(p, NULL);
return RET_OK;
}