Changeset 261


Ignore:
Timestamp:
Oct 24, 2004, 11:57:28 PM (21 years ago)
Author:
pr
Message:

XWP bug 583

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/exeh.h

    r257 r261  
    6464         USHORT usIPStartup;            // 14: IP at startup
    6565         USHORT usCodeSegOfs;           // 16: code segment offset from EXE start
    66          USHORT usRelocTableOfs;        // 18: reloc table ofs.header (Win: >= 0x40)
     66         USHORT usRelocTableOfs;        // 18: reloc table ofs.header (Win: >= 0x40 || 0)
    6767         USHORT usOverlayNo;            // 1a: overlay no.
    6868         USHORT usLinkerVersion;        // 1c: linker version (if 0x18 > 0x28)
     
    7878         ULONG  ulUnused6;              // 34:
    7979         ULONG  ulUnused7;              // 38:
    80          ULONG  ulNewHeaderOfs;         // 3c: new header ofs (if 0x18 > 0x40)
     80         ULONG  ulNewHeaderOfs;         // 3c: new header ofs (if 0x18 >= 0x40 || 0)
    8181                    // fixed this from USHORT, thanks Martin Lafaix
    8282                    // V0.9.7 (2000-12-20) [umoeller]
  • trunk/src/cppbase/makefile

    r249 r261  
    8686+$(OBJS: =&^
    8787);
    88 <<KEEP
     88<<
    8989
  • trunk/src/helpers/exeh.c

    r257 r261  
    294294            else
    295295            {
     296                // V1.0.3 (2004-10-24) [pr]: Some non-DOS EXEs have a relocation table
     297                // offset which is 0 - these were previously identified as DOS EXEs.
    296298                // we have a DOS header:
    297                 if (pExec->DosExeHeader.usRelocTableOfs < 0x40)
    298                 {
    299                     // neither LX nor PE nor NE:
    300                     pExec->ulOS = EXEOS_DOS3;
    301                     pExec->ulExeFormat = EXEFORMAT_OLDDOS;
    302                 }
    303                 else
     299                if (   (   (pExec->DosExeHeader.usRelocTableOfs == 0)
     300                        || (pExec->DosExeHeader.usRelocTableOfs >= sizeof(DOSEXEHEADER))
     301                       )
     302                    && (pExec->DosExeHeader.ulNewHeaderOfs != 0)
     303                   )
    304304                {
    305305                    // we have a new header offset:
    306306                    fLoadNewHeader = TRUE;
    307307                    ulNewHeaderOfs = pExec->DosExeHeader.ulNewHeaderOfs;
     308                }
     309                else
     310                {
     311                    // else DOS:
     312                    pExec->ulOS = EXEOS_DOS3;
     313                    pExec->ulExeFormat = EXEFORMAT_OLDDOS;
    308314                }
    309315            }
  • trunk/src/helpers/makefile

    r249 r261  
    8080+$(OBJS: =&^
    8181);
    82 <<KEEP
     82<<
    8383
    8484# ***************************************************************************
     
    9595+$(CPOBJS: =&^
    9696);
    97 <<KEEP
     97<<
    9898
    9999
  • trunk/src/libbz2/makefile

    r250 r261  
    8787+$(OBJS: =&^
    8888);
    89 <<KEEP
     89<<
    9090
    9191
Note: See TracChangeset for help on using the changeset viewer.