summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-27 07:51:36 +0200
committerGitHub <noreply@github.com>2021-07-27 07:51:36 +0200
commitae1b124e1432beb8d25ee4a89f6a5c9af2876ea8 (patch)
tree9ed828f8407e9cc87c120fe2127428516053f5e4 /scene/2d
parent8ff29d1879780fe6cdf0d24d6b92bf9a1275bfa3 (diff)
parent448295cd5183dc8cc168651aa69f5569538dce54 (diff)
Merge pull request #50925 from timothyqiu/internal-checks
Add checks to internal methods to prevent crash
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/tile_map.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 3932f3dc78..e9efa1cf84 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -795,6 +795,7 @@ void TileMap::_set_tile_data(const Vector<int> &p_data) {
const int *r = p_data.ptr();
int offset = (format >= FORMAT_2) ? 3 : 2;
+ ERR_FAIL_COND_MSG(c % offset != 0, "Corrupted tile data.");
clear();