summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CApi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CApi.h b/src/CApi.h
index c6ffea3..9dbf4d9 100644
--- a/src/CApi.h
+++ b/src/CApi.h
@@ -236,9 +236,9 @@ static int c_open_door(lua_State *L) {
can_open = true;
// erase key
lvl->heldKeys.erase(lvl->heldKeys.begin() + k);
- lvl->doorPositions.erase(lvl->doorPositions.begin() + i);
lvl->map[lvl->doorPositions[i].y][lvl->doorPositions[i].x] =
BLANK_SPACE;
+ lvl->doorPositions.erase(lvl->doorPositions.begin() + i);
break;
}
}