Fixed infinite loop when interting into memory map

This commit is contained in:
2021-04-12 15:51:25 -05:00
parent f2c19bd4c4
commit 2f7300fbf8

View File

@@ -123,7 +123,7 @@ int trim_map(struct memory_map_t *map, int index)
void insert_region(struct memory_map_t *map, physaddr_t location, size_t size, unsigned int type) void insert_region(struct memory_map_t *map, physaddr_t location, size_t size, unsigned int type)
{ {
insert_map_entry(map, location, size, type); insert_map_entry(map, location, size, type);
unsigned int i = 0; int i = 0;
while(i >= 0) while(i >= 0)
{ {
i = trim_map(map, i); i = trim_map(map, i);