Fix crash in Transvoxel mesher when the input block is not cubic

master
Marc Gilleron 2021-07-07 00:22:02 +01:00
parent e05fb7a045
commit 40cd4b3b98
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ public:
ReuseCell &get_reuse_cell(Vector3i pos) {
unsigned int j = pos.z & 1;
unsigned int i = pos.y * _block_size.y + pos.x;
unsigned int i = pos.y * _block_size.x + pos.x;
CRASH_COND(i >= _cache[j].size());
return _cache[j][i];
}