diff --git a/src/main.c b/src/main.c index 3a0203045..db9a0b8d5 100644 --- a/src/main.c +++ b/src/main.c @@ -476,7 +476,7 @@ void *build_save(int *size, int x0, int y0, int w, int h, unsigned char bmap[YRE for (j=0; j=43) || (ty==PT_BCLN && ver>=44) || (ty==PT_SPRK && ver>=21) || (ty==PT_LAVA && ver>=34) || (ty==PT_PIPE && ver>=43) || (ty==PT_LIFE && ver>=51) || (ty==PT_PBCN && ver>=52))) + if (i && (ty==PT_CLNE || (ty==PT_PCLN && ver>=43) || (ty==PT_BCLN && ver>=44) || (ty==PT_SPRK && ver>=21) || (ty==PT_LAVA && ver>=34) || (ty==PT_PIPE && ver>=43) || (ty==PT_LIFE && ver>=51) || (ty==PT_PBCN && ver>=52) || (ty==PT_WIRE && ver>=55))) { if (p >= size) goto corrupt;