forked from github/server
fix a parser crash in the USE command.
This commit is contained in:
parent
258f3c37c0
commit
31ca0ce052
|
@ -3772,6 +3772,10 @@ int use_cmd(unit * u, struct order *ord)
|
||||||
init_order(ord);
|
init_order(ord);
|
||||||
|
|
||||||
t = gettoken(token, sizeof(token));
|
t = gettoken(token, sizeof(token));
|
||||||
|
if (!t) {
|
||||||
|
cmistake(u, ord, 43, MSG_PRODUCE);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
n = atoi((const char *)t);
|
n = atoi((const char *)t);
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
if (isparam(t, u->faction->locale, P_ANY)) {
|
if (isparam(t, u->faction->locale, P_ANY)) {
|
||||||
|
|
Loading…
Reference in New Issue