Fix trying to use a pointer as a non-pointer
Use an integral type in the loop so that it increments