fix a parser crash in the USE command.

This commit is contained in:
Enno Rehling 2015-07-02 13:42:15 +02:00
parent 258f3c37c0
commit 31ca0ce052
1 changed files with 4 additions and 0 deletions

View File

@ -3772,6 +3772,10 @@ int use_cmd(unit * u, struct order *ord)
init_order(ord);
t = gettoken(token, sizeof(token));
if (!t) {
cmistake(u, ord, 43, MSG_PRODUCE);
return err;
}
n = atoi((const char *)t);
if (n == 0) {
if (isparam(t, u->faction->locale, P_ANY)) {