size_t changed to int to avoid comparison of different signs

size_t changed to int to avoid comparison of different signs