Fix condition

This commit is contained in:
Alex 2023-05-12 06:02:16 +03:00
parent c99dcc113d
commit 61c53c127c
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ EXTERNC void multiboot_main(uintptr_t Magic, uintptr_t Info)
mb2binfo.Memory.Entries = EntryCount; mb2binfo.Memory.Entries = EntryCount;
for (uint32_t i = 0; i < EntryCount; i++) for (uint32_t i = 0; i < EntryCount; i++)
{ {
if (EntryCount > MAX_MEMORY_ENTRIES) if (i > MAX_MEMORY_ENTRIES)
{ {
warn("Too many memory entries, skipping the rest..."); warn("Too many memory entries, skipping the rest...");
break; break;

View File

@ -114,7 +114,7 @@ EXTERNC void multiboot_main(uintptr_t Magic, uintptr_t Info)
mb2binfo.Memory.Entries = EntryCount; mb2binfo.Memory.Entries = EntryCount;
for (uint32_t i = 0; i < EntryCount; i++) for (uint32_t i = 0; i < EntryCount; i++)
{ {
if (EntryCount > MAX_MEMORY_ENTRIES) if (i > MAX_MEMORY_ENTRIES)
{ {
warn("Too many memory entries, skipping the rest..."); warn("Too many memory entries, skipping the rest...");
break; break;