Mail Archives: djgpp/1997/07/26/12:00:50
You wrote:
>void setpalzero ()
>{
> int i;
> COLOR *temp;
> for (i = 0; i < 256; i++)
> temp[i].red = temp[i].gre = temp[i].blu = 0;
temp is an unitialized pointer here. You are writing to god-knows-where. Try
making it an array.
>
> SlamPal (temp);
>}
>[main function deleted]
I saw the same idea used elsewhere in the code. You have COLOR pointers
which you are using as palettes, but they don't actually point to any
storage. They aren't necessarily NULL either, so allowing that might not help.
HTH
Nate Eldredge
eldredge AT ap DOT net
- Raw text -