Quote Originally Posted by Teegtahn View Post
Resolved, thanks. -- Still curious though, why would the printf(""); make it work?
Because the program with the printf("") is a different program than one without it. Things were arranged differently in memory in a way that concealed your bug. Also, adding a function call can change the effects of an uninitialized-local-variable bug.