Crash fixes

This commit is contained in:
Late Night Defender 2021-11-21 22:19:44 +07:00
parent d77a24db0a
commit 78ae4bb292

View file

@ -451,7 +451,7 @@ int game(){
clock_t start_t,this_t,start; clock_t start_t,this_t,start;
start_t=clock(); start_t=clock();
start=start_t; start=start_t;
int posX[100],posY[100],fruitX,fruitY,snakeLength=2,ft=0,bombX[100],bombY[100],bombAmount=3,bombLoop=1; int posX[101],posY[101],fruitX,fruitY,snakeLength=2,ft=0,bombX[100],bombY[100],bombAmount=3,bombLoop=1;
int tempX[2],tempY[2]; int tempX[2],tempY[2];
bool bombShown[100]; bool bombShown[100];
double thistimeMillisec; double thistimeMillisec;
@ -465,7 +465,7 @@ int game(){
init_pair(1,COLOR_WHITE, COLOR_BLACK); init_pair(1,COLOR_WHITE, COLOR_BLACK);
wbkgd(stdscr, COLOR_PAIR(1)); wbkgd(stdscr, COLOR_PAIR(1));
printf("\e[?25l");//ปิดcursor printf("\e[?25l");//ปิดcursor
for(int i=0;i<100;i++){ for(int i=0;i<101;i++){
posX[i]=-1; posX[i]=-1;
posY[i]=-1; posY[i]=-1;
} }