Oops, SetFlag() should not clear the entire data

This commit is contained in:
Alex
2022-12-05 06:02:25 +02:00
parent 2d1c42fbcd
commit 0116fd3b38
2 changed files with 5 additions and 1 deletions

View File

@ -7,7 +7,7 @@ namespace Memory
void PageDirectoryEntry::ClearFlags() { this->Value.raw = 0; }
void PageDirectoryEntry::SetFlag(uint64_t Flag, bool Enabled)
{
this->Value.raw = 0;
this->Value.raw &= ~Flag;
if (Enabled)
this->Value.raw |= Flag;
}