Correct IDT address computation

And I'm suppose to be graduate for that...
This commit is contained in:
Mathieu Maret 2018-07-12 17:36:38 +02:00
parent 9cd70a7046
commit f18249fab6
1 changed files with 2 additions and 2 deletions

4
idt.c
View File

@ -53,8 +53,8 @@ int idt_set_handler(int index, unsigned int addr, int priviledge)
idte = idt + index;
if (addr != (unsigned int)NULL) {
idte->offset_low = addr && 0xffff;
idte->offset_high = (addr >> 16) && 0xffff;
idte->offset_low = addr & 0xffff;
idte->offset_high = (addr >> 16) & 0xffff;
idte->dpl = priviledge;
idte->present = 1;
} else {