index "i" needs to be signed int, not size_t

negative value indicates end of array object parse