diff --git a/Architecture/amd64/cpu/AdvancedProgrammableInterruptController.cpp b/Architecture/amd64/cpu/AdvancedProgrammableInterruptController.cpp index 6f84d69..4b01052 100644 --- a/Architecture/amd64/cpu/AdvancedProgrammableInterruptController.cpp +++ b/Architecture/amd64/cpu/AdvancedProgrammableInterruptController.cpp @@ -219,7 +219,7 @@ namespace APIC { SmartCriticalSection(APICLock); APIC_BASE BaseStruct = {.raw = rdmsr(MSR_APIC_BASE)}; - APICBaseAddress = BaseStruct.ApicBaseLo << 12u | BaseStruct.ApicBaseHi << 32u; + APICBaseAddress = BaseStruct.ApicBaseLo << 12u | (unsigned long)BaseStruct.ApicBaseHi << 32u; trace("APIC Address: %#lx", APICBaseAddress); uint32_t rcx; diff --git a/include/hashmap.hpp b/include/hashmap.hpp index 5873a17..429a723 100644 --- a/include/hashmap.hpp +++ b/include/hashmap.hpp @@ -40,13 +40,13 @@ public: HashNode *tmp = new HashNode(Key, Value); int Index = HashCode(Key); - while (Nodes[Index] != nullptr && Nodes[Index]->Key != Key && Nodes[Index]->Key != -1) + while (Nodes[Index] != nullptr && Nodes[Index]->Key != Key && Nodes[Index]->Key != (K)-1) { Index++; Index %= HashMapCapacity; } - if (Nodes[Index] == nullptr || Nodes[Index]->Key == -1) + if (Nodes[Index] == nullptr || Nodes[Index]->Key == (K)-1) HashMapSize++; Nodes[Index] = tmp; } @@ -80,7 +80,7 @@ public: if (Iterate++ > HashMapCapacity) return 0xdeadbeef; - if (Nodes[Index]->Key == Key) + if (Nodes[Index]->Key == (K)Key) return Nodes[Index]->Value; Index++; Index %= HashMapCapacity;