No! I'm sure I didn't even touch anything else apart from changing float to int for that variable.(I mean, I 've tried doing every permutation to get to the bottom of this when I finally came at this float thing. Of course it bugs me as to why C should care whether I use float or int as long as I use it correctly!Because you inadvertently fixed the problem while making the change from float to int