mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -04:00
C client: Fix garbage blocks with inf id in rare case
small map, initially purely classic blocks only (so no upper array is sent by server), and you then tried to place a block above 256
This commit is contained in:
parent
bc10416f97
commit
9bcbb734b0
@ -70,7 +70,7 @@ void World_SetBlock(Int32 x, Int32 y, Int32 z, BlockID block) {
|
||||
/* defer allocation of second map array if possible */
|
||||
if (World_Blocks == World_Blocks2) {
|
||||
if (block < 256) return;
|
||||
World_Blocks2 = Mem_Alloc(World_BlocksSize, 1, "blocks array upper");
|
||||
World_Blocks2 = Mem_AllocCleared(World_BlocksSize, 1, "blocks array upper");
|
||||
Block_SetUsedCount(768);
|
||||
}
|
||||
World_Blocks2[i] = (BlockRaw)(block >> 8);
|
||||
|
Loading…
x
Reference in New Issue
Block a user