diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index c5f3bb76f4..6e7498344e 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -1082,7 +1082,7 @@ InitInterruptDescriptorTable ( if ((OldIdtPtr.Base != 0) && ((OldIdtPtr.Limit & 7) == 7)) { OldIdt = (IA32_IDT_GATE_DESCRIPTOR*) OldIdtPtr.Base; - OldIdtSize = (OldIdtPtr.Limit + 1) / 8; + OldIdtSize = (OldIdtPtr.Limit + 1) / sizeof (IA32_IDT_GATE_DESCRIPTOR); } else { OldIdt = NULL; OldIdtSize = 0;