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:
2a7ddc0
)
Server: Fix segfault when parsing THINGS_HERE on player sans .fov_map.
author
Christian Heller
<c.heller@plomlompom.de>
Fri, 6 Feb 2015 00:00:56 +0000
(
01:00
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Fri, 6 Feb 2015 00:00:56 +0000
(
01:00
+0100)
src/server/run.c
patch
|
blob
|
history
diff --git
a/src/server/run.c
b/src/server/run.c
index 38dc5a04174edc6b68832f227cbb40f9a7a2ac8d..c160e9fcea3d19900f1e9a7d6dabb285a88952c1 100644
(file)
--- a/
src/server/run.c
+++ b/
src/server/run.c
@@
-222,7
+222,8
@@
static uint8_t parse_command_meta(char * tok0)
}
send_to_outfile("THINGS_HERE START\n", 1);
struct Thing * player = get_player();
- if ('v' == player->fov_map[atoi(tok1)*world.map.length+atoi(tok2)])
+ if (player->fov_map &&
+ 'v' == player->fov_map[atoi(tok1)*world.map.length+atoi(tok2)])
{
struct Thing * t;
for (t = world.things; t; t = t->next)