0

Fixed nether rendering crash

The nether rendering mode was not properly handling x and z values
outside of the range 0 to 15.  This was causing an out-of-bounds
segfault when accessing the remove_block array.

Fixes #881
Fixes #851
Fixes #852
This commit is contained in:
Andrew Chin
2013-02-07 19:44:56 -05:00
parent 94f51136b1
commit 2377b3cd52
3 changed files with 10 additions and 8 deletions

View File

@@ -22,9 +22,11 @@
#define DEPTH 16
#define HEIGHT 256
// add two to these because the primative functions should expect to
// deal with x and z values of -1 and 16
typedef struct {
int walked_chunk;
int remove_block[WIDTH][HEIGHT][DEPTH];
int remove_block[WIDTH+2][HEIGHT][DEPTH+2];
} RenderPrimitiveNether;