Hmmn, we'll need to know whether it is overflowing or underflowing the test, then. Try replacing

printf("constraint violated");

with this:

printf("\n\tconstraint violated: ");
if (fill_s[0] < fsi)
    printf("underflow, %d < %d\n", fill_s[0], fsi));
else if (fill_s[0] > fsf)
    printf("overflow, %d > %d\n", fill_s[0], fsf));
    printf("unknown error, program halting.\n");

That will at least tell you more about the problem.

Edited by Schol-R-LEA

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.