Changeset 262 for branches


Ignore:
Timestamp:
Oct 25, 2004, 12:02:36 AM (21 years ago)
Author:
pr
Message:

XWP bug 583

Location:
branches/branch-1-0
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1-0/include/helpers/exeh.h

    r136 r262  
    6363         USHORT usIPStartup;            // 14: IP at startup
    6464         USHORT usCodeSegOfs;           // 16: code segment offset from EXE start
    65          USHORT usRelocTableOfs;        // 18: reloc table ofs.header (Win: >= 0x40)
     65         USHORT usRelocTableOfs;        // 18: reloc table ofs.header (Win: >= 0x40 || 0)
    6666         USHORT usOverlayNo;            // 1a: overlay no.
    6767         USHORT usLinkerVersion;        // 1c: linker version (if 0x18 > 0x28)
     
    7777         ULONG  ulUnused6;              // 34:
    7878         ULONG  ulUnused7;              // 38:
    79          ULONG  ulNewHeaderOfs;         // 3c: new header ofs (if 0x18 > 0x40)
     79         ULONG  ulNewHeaderOfs;         // 3c: new header ofs (if 0x18 >= 0x40 || 0)
    8080                    // fixed this from USHORT, thanks Martin Lafaix
    8181                    // V0.9.7 (2000-12-20) [umoeller]
     
    231231    typedef struct _LXHEADER
    232232    {
    233         CHAR        achLX[2];           // 00: e32_magic  "LX" or "LE" magic
     233        CHAR      achLX[2];             // 00: e32_magic  "LX" or "LE" magic
    234234            // this is "LX" for 32-bit OS/2 programs, but
    235235            // "LE" for MS-DOS progs which use this format
  • branches/branch-1-0/src/helpers/exeh.c

    r229 r262  
    292292            else
    293293            {
     294                // V1.0.3 (2004-10-24) [pr]: Some non-DOS EXEs have a relocation table
     295                // offset which is 0 - these were previously identified as DOS EXEs.
    294296                // we have a DOS header:
    295                 if (pExec->pDosExeHeader->usRelocTableOfs < 0x40)
    296                 {
    297                     // neither LX nor PE nor NE:
    298                     pExec->ulOS = EXEOS_DOS3;
    299                     pExec->ulExeFormat = EXEFORMAT_OLDDOS;
    300                 }
    301                 else
     297                if (   (   (pExec->pDosExeHeader->usRelocTableOfs == 0)
     298                        || (pExec->pDosExeHeader->usRelocTableOfs >= sizeof(DOSEXEHEADER))
     299                       )
     300                    && (pExec->pDosExeHeader->ulNewHeaderOfs != 0)
     301                   )
    302302                {
    303303                    // we have a new header offset:
    304304                    fLoadNewHeader = TRUE;
    305305                    ulNewHeaderOfs = pExec->pDosExeHeader->ulNewHeaderOfs;
     306                }
     307                else
     308                {
     309                    // else DOS:
     310                    pExec->ulOS = EXEOS_DOS3;
     311                    pExec->ulExeFormat = EXEFORMAT_OLDDOS;
    306312                }
    307313            }
  • branches/branch-1-0/src/helpers/makefile

    r227 r262  
    157157+$(OBJS: =&^
    158158);
    159 <<KEEP
     159<<
    160160!endif
    161161
     
    169169+$(CPOBJS: =&^
    170170);
    171 <<KEEP
     171<<
    172172!endif
    173173
     
    181181+$(PLAINCOBJS: =&^
    182182);
    183 <<KEEP
     183<<
    184184!endif
    185185
Note: See TracChangeset for help on using the changeset viewer.