I'm glad I could help, but look at it: I was forced to give three completely wild guesses because you insisted the error had to be in the line of code you provided, which we told you (correctly) it wasn't and said it was in your logic (which it was -- using the wrong tool for the job is a logic error just like everything else), and refused to provide any more context despite being asked five times (posts 2, 3, 8, 9, and 12 in chronological order, for those playing along at home). The fact that one of my guesses turned out to be right does not make your position defensible, it just means I'm a lucky guesser. What I (and others) are trying to do is provide an experience that will make it more likely, the next time you have a question, that you will tell us what's going on instead of making us guess.
Not to be taken seriously:
Being a bit more specific never hurts those that have read the words unspecified followed by undefined and implementation defined in every line of text of horridly confusing to humans documents spanning hundreds and hundreds of lines without blinking for hours, ... and survived.
To be taken seriously:
Sometimes logic can become quite irrational. Sequence points, in translation units might impose or suffer imposed side-effects from previous sequence points, or subsequent sequence points, in ways that could drive a reasonable person MAD!
A typical example of ...cheap programming practices.Code:... goto johny_walker_red_label; johny_walker_blue_label: exit(-149$); johny_walker_red_label : exit( -22$);