home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d847c33
)
Server: Ensure THING_ACTION command fails on argument 0.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 23 Jul 2014 05:34:22 +0000
(07:34 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 23 Jul 2014 05:34:22 +0000
(07:34 +0200)
src/server/god_commands.c
patch
|
blob
|
history
diff --git
a/src/server/god_commands.c
b/src/server/god_commands.c
index eee8b1105e22a5c5cfe22c9bdb6b1f6a867eaacc..8bde74235a29e721e7c2afd3dcda2ac7713cafcf 100644
(file)
--- 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)
{