From: Christian Heller Date: Wed, 23 Jul 2014 05:34:22 +0000 (+0200) Subject: Server: Ensure THING_ACTION command fails on argument 0. X-Git-Tag: tce~697 X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=13a59c560b0d5b89e02660a63d5e6307540b13f6;p=plomrogue Server: Ensure THING_ACTION command fails on argument 0. --- diff --git a/src/server/god_commands.c b/src/server/god_commands.c index eee8b11..8bde742 100644 --- a/src/server/god_commands.c +++ b/src/server/god_commands.c @@ -159,6 +159,11 @@ static uint8_t parse_thingaction_manipulation(char * tok0, char * tok1) } else if (parse_val(tok0, tok1, s[S_CMD_THINGACTION], '8', (char *) &id)) { + if (!id) + { + err_line(1, "Value must be >= 1 and <= 255."); + return 1; + } ta = get_thing_action(id); if (!ta) {