diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-02-16 20:56:43 (GMT) |
|---|---|---|
| committer | FacialTurd <simon@hardwired.org.uk> | 2011-02-18 23:07:08 (GMT) |
| commit | 72e6fdd9f645e2d490fba7dd520851314b161cab (patch) | |
| tree | fbc69bcf3810cf3222dff35c9f76a52a7dae49f7 /src | |
| parent | 8c6f93cd206056985288ef7baad6faf8220e7760 (diff) | |
| download | powder-72e6fdd9f645e2d490fba7dd520851314b161cab.zip powder-72e6fdd9f645e2d490fba7dd520851314b161cab.tar.gz | |
Preventing creation of invalid types also prevented use of air/temp tools
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/powder.c b/src/powder.c index 986a678..78562b8 100644 --- a/src/powder.c +++ b/src/powder.c @@ -523,7 +523,7 @@ inline int create_part(int p, int x, int y, int t) { int i; - if (x<0 || y<0 || x>=XRES || y>=YRES || t<0 || t>=PT_NUM) + if (x<0 || y<0 || x>=XRES || y>=YRES || ((t<0 || t>=PT_NUM)&&t!=SPC_HEAT&&t!=SPC_COOL&&t!=SPC_AIR&&t!=SPC_VACUUM)) return -1; if (t==SPC_HEAT||t==SPC_COOL) |
