Trouble exiting do-while

This is a discussion on Trouble exiting do-while within the C Programming forums, part of the General Programming Boards category; Alright I figured out my first problem, so now I can't figure out why I can't exit the 'checkGuess' function ...

OK I have it now where it will exit, but even when a "peg" is in the correct spot, a white peg is still added (white peg being that that you guessed a right color in the wrong spot). I checked it out and added a printf statement that tells me what number is stored in white, and every time it comes out 4 when I enter all the correct pegs in the correct order ><