主题:请问这一段为什么会让系统崩溃?
void fill(int x, int y)
{
void *buffer;
int size;
size = imagesize(Lefbord,Topbord,Rigbord,Botbord);
buffer = malloc(size);
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
setactivepage(1);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
setfillstyle(1,GREEN);
if(getpixel(x+1,y+1)!=GREEN) {
floodfill(x+1,y+1,GREEN);
if(getpixel(xb1,yb1)!=GREEN && getpixel(xb2,yb2)!=GREEN) {
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
}
}
if(getpixel(x-1,y+1)!=GREEN) {
floodfill(x-1,y+1,GREEN);
if(getpixel(xb1,yb1)!=GREEN && getpixel(xb2,yb2)!=GREEN) {
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
}
}
if(getpixel(x-1,y-1)!=GREEN) {
floodfill(x-1,y-1,GREEN);
if(getpixel(xb1,yb1)!=GREEN && getpixel(xb2,yb2)!=GREEN) {
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
}
}
if(getpixel(x-1,y-1)!=GREEN) {
floodfill(x+1,y+1,GREEN);
if(getpixel(xb1,yb1)!=GREEN && getpixel(xb2,yb2)!=GREEN) {
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
}
}
setactivepage(0);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
setvisualpage(0);
free(buffer);
}
{
void *buffer;
int size;
size = imagesize(Lefbord,Topbord,Rigbord,Botbord);
buffer = malloc(size);
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
setactivepage(1);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
setfillstyle(1,GREEN);
if(getpixel(x+1,y+1)!=GREEN) {
floodfill(x+1,y+1,GREEN);
if(getpixel(xb1,yb1)!=GREEN && getpixel(xb2,yb2)!=GREEN) {
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
}
}
if(getpixel(x-1,y+1)!=GREEN) {
floodfill(x-1,y+1,GREEN);
if(getpixel(xb1,yb1)!=GREEN && getpixel(xb2,yb2)!=GREEN) {
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
}
}
if(getpixel(x-1,y-1)!=GREEN) {
floodfill(x-1,y-1,GREEN);
if(getpixel(xb1,yb1)!=GREEN && getpixel(xb2,yb2)!=GREEN) {
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
}
}
if(getpixel(x-1,y-1)!=GREEN) {
floodfill(x+1,y+1,GREEN);
if(getpixel(xb1,yb1)!=GREEN && getpixel(xb2,yb2)!=GREEN) {
getimage(Lefbord,Topbord,Rigbord,Botbord,buffer);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
}
}
setactivepage(0);
putimage(Lefbord,Topbord,buffer,COPY_PUT);
setvisualpage(0);
free(buffer);
}