Fix crash due to unsigned index and 0 boundary loop.

This commit is contained in:
Scott Shawcroft 2018-08-16 00:29:18 -07:00
parent 5f08ebdfc8
commit e72cebbad6
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59

View File

@ -43,7 +43,7 @@ void memory_init(void) {
}
void free_memory(supervisor_allocation* allocation) {
uint8_t index = 0;
int32_t index = 0;
bool found = false;
for (index = 0; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) {
found = allocation == &allocations[index];