--- np2/i386c/ia32/exception.c 2011/12/20 09:03:28 1.27 +++ np2/i386c/ia32/exception.c 2011/12/21 16:25:52 1.28 @@ -430,7 +430,7 @@ interrupt_intr_or_trap(const descriptor_ break; } - exc_errcode = cs_sel.idx; + exc_errcode = gsdp->u.gate.selector & ~3; if (intrtype == INTR_TYPE_EXTINTR) exc_errcode++;