Fixes for potential crashes
This commit is contained in:
parent
76b6a886b3
commit
2bd851e148
@ -2835,7 +2835,7 @@ pixel *prerender_save(void *save, int size, int *width, int *height)
|
||||
j=d[p++];
|
||||
if(j<PT_NUM && j>0)
|
||||
{
|
||||
if(j==PT_STKM) //Stickman should be drawed another way
|
||||
/*if(j==PT_STKM) //Stickman should be drawed another way //Was crashing TODO: FIX
|
||||
{
|
||||
//Stickman drawing
|
||||
for(k=-2; k<=1; k++)
|
||||
@ -2850,7 +2850,7 @@ pixel *prerender_save(void *save, int size, int *width, int *height)
|
||||
draw_line(fb , x, y+3, x+1, y+6, 255, 255, 255, w);
|
||||
draw_line(fb , x+1, y+6, x+3, y+12, 255, 255, 255, w);
|
||||
}
|
||||
else
|
||||
else*/
|
||||
fb[y*w+x] = ptypes[j].pcolors;
|
||||
}
|
||||
}
|
||||
|
14
src/main.c
14
src/main.c
@ -427,13 +427,15 @@ int parse_save(void *save, int size, int replace, int x0, int y0)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(c[3]==1||c[3]==0||c[3]==2||c[3]==3){
|
||||
legacy_enable = c[3]&0x01;
|
||||
if(ver>=44){
|
||||
sys_pause = (c[3]&0x02)>>1;
|
||||
if(ver>=44){
|
||||
legacy_enable = c[3]&0x01;
|
||||
sys_pause = (c[3]>>1)&0x01;
|
||||
} else {
|
||||
if(c[3]==1||c[3]==0){
|
||||
legacy_enable = c[3];
|
||||
} else {
|
||||
legacy_beta = 1;
|
||||
}
|
||||
} else {
|
||||
legacy_beta = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user