diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/map/mapheights.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resources/map/mapheights.h b/src/resources/map/mapheights.h index c0fb2b6f8..149645b3d 100644 --- a/src/resources/map/mapheights.h +++ b/src/resources/map/mapheights.h @@ -37,7 +37,7 @@ class MapHeights final void setHeight(const int x, const int y, const uint8_t height); uint8_t getHeight(const int x, const int y) const - { return mTiles[x + y * mWidth]; } + { return x < mWidth && y < mHeight ? mTiles[x + y * mWidth] : 0; } private: int mWidth; |