Skip to content

Commit

Permalink
Kernel: Fix typo in Descriptor::set_limit()
Browse files Browse the repository at this point in the history
x86 descriptor limits are 20 bytes, not 24 bytes. This was already
a 4-bit wide bitfield, so no damage done, but let's be correct.
  • Loading branch information
awesomekling committed Jan 1, 2020
1 parent fd74082 commit 37329c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Kernel/Arch/i386/CPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ union [[gnu::packed]] Descriptor
void set_limit(u32 l)
{
limit_lo = (u32)l & 0xffff;
limit_hi = ((u32)l >> 16) & 0xff;
limit_hi = ((u32)l >> 16) & 0xf;
}
};

Expand Down

0 comments on commit 37329c2

Please sign in to comment.