Sometimes when I'm working on a project I do things like this:
Code:
while( true ){
...
...
// just in case :D
if( foo-- <= 0 ){
}
}
Although it's impossible for integer 'foo' to just skip a value(ie. in a loop) I always check to see if it's equal to or less then <number here> even if it's impossible for foo to be anything lower then that number. I feel much safer when I do it like this.
Sounds familiar? Or do you do something like this?
ASSERT(foo-- <= 0);
yay for debug builds :P
We never know.. we never know.. Yep same crap happens to me aswell.