Check the value of 'c'. Maybe it is -1.