diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-07-09 19:09:29 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-07-09 19:09:29 (GMT) |
| commit | 61f39f5464f4f5d39c76f8427127e8998cc8e618 (patch) | |
| tree | 54b17c4f7d792aa172b22b83ff8a972b4deaa9cd /src/save.c | |
| parent | 3e1d3cd5a6382f1ad7dacee48cfee04188601670 (diff) | |
| download | powder-61f39f5464f4f5d39c76f8427127e8998cc8e618.zip powder-61f39f5464f4f5d39c76f8427127e8998cc8e618.tar.gz | |
Add ptypes.enabled checks to a few more places
Diffstat (limited to 'src/save.c')
| -rw-r--r-- | src/save.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1237,7 +1237,7 @@ int parse_save_OPS(void *save, int size, int replace, int x0, int y0, unsigned c fprintf(stderr, "Out of range [%d]: %d %d, [%d, %d], [%d, %d]\n", i, x, y, (unsigned)partsData[i+1], (unsigned)partsData[i+2], (unsigned)partsData[i+3], (unsigned)partsData[i+4]); goto fail; } - if(partsData[i] >= PT_NUM) + if(partsData[i] >= PT_NUM || !ptypes[partsData[i]].enabled) partsData[i] = PT_DMND; //Replace all invalid elements with diamond if(pmap[y][x] && posCount==0) // Check posCount to make sure an existing particle is not replaced twice if two particles are saved in that position { |
