This should be unsigned, but better still would be a size_t.