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

XWP bug 583

Location:
branches/branch-1-0/src/helpers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.