Fixed a warning about comparing ints
The program was comparing an unsigned int and a signed int.