summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 8ecefb5a0..38ba9ae41 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3683,7 +3683,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map->list[m].save.map = 0;
map->list[m].save.x = -1;
map->list[m].save.y = -1;
- } else if (sscanf(w4, "%31[^,],%d,%d", savemap, &savex, &savey) == 3) {
+ } else if (w4 && sscanf(w4, "%31[^,],%d,%d", savemap, &savex, &savey) == 3) {
map->list[m].save.map = mapindex->name2id(savemap);
map->list[m].save.x = savex;
map->list[m].save.y = savey;