diff --git a/lx_loader.c b/lx_loader.c index ae6f973..e29b81e 100644 --- a/lx_loader.c +++ b/lx_loader.c @@ -542,6 +542,8 @@ static void *lxConvert1616to32(const uint32 addr1616) const uint16 selector = (uint16) (addr1616 >> 19); // slide segment down, and shift out control bits. const uint16 offset = (uint16) (addr1616 % 0x10000); // all our LDT segments start at 64k boundaries (at the moment!). + if (selector == 0) // segment 0x0000 or 0x0003: the OS/2 null selector. + return NULL; //printf("lxConvert1616to32: 0x%X -> %p\n", (uint) addr1616, (void *) (size_t) (GLoaderState.ldt[selector] + offset)); assert(GLoaderState.ldt[selector] != 0); return (void *) (size_t) (GLoaderState.ldt[selector] + offset);