forked from EXTERNAL/bareiron
validate block change buffer boundaries for chests
This commit is contained in:
@@ -579,6 +579,8 @@ uint8_t makeBlockChange (short x, uint8_t y, short z, uint8_t block) {
|
||||
// which naturally appends the chest to the end if a gap isn't found.
|
||||
int last_real_entry = first_gap - 1;
|
||||
for (int i = first_gap; i <= block_changes_count + 15; i ++) {
|
||||
if (i >= MAX_BLOCK_CHANGES) break; // No more space, trigger failBlockChange
|
||||
|
||||
if (block_changes[i].block != 0xFF) {
|
||||
last_real_entry = i;
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user