eXtremely strange problem with amount indicator
Look at this section of code:
Before calling this, the varible quads is 50.
Code:
// Copy the wings to the other side now:
for(x = 0, bWingsOut = FALSE; x < quads; x++) {
if(quadEx[x] == XL_WING) bWingsOut = TRUE;
if(bWingsOut) {
if(quadEx[x] == XL_END) bWingsOut = FALSE;
quadEx[quads] = quadEx[x]; // THIS LINE
for(y = 0; y < 7; y++)
quad[quads][y] = quad[x][y];
quad[quads][1] = -quad[x][1];
quads++; } }
After I call this, quads becomes 3. Why?? I only alter quads for the greater once!
The weird thing is, when I comment out THIS LINE, quads is what it's suppose to be.
Please help.