Ignore:
Timestamp:
Feb 23, 2002, 11:48:19 AM (24 years ago)
Author:
sandervl
Message:

bugfix for errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/peldr/pe.cpp

    r7970 r7991  
    1 /* $Id: pe.cpp,v 1.32 2002-02-20 09:45:49 sandervl Exp $ */
     1/* $Id: pe.cpp,v 1.33 2002-02-23 10:48:19 sandervl Exp $ */
    22
    33/*
     
    169169                strcat(exeShortName, ext);
    170170
    171                 if ( strlen(fullpath) == 0 ) {
    172                         DosSearchPath( SEARCH_CUR_DIRECTORY | SEARCH_ENVIRONMENT | SEARCH_IGNORENETERRS
     171                if ( strlen(fullpath) == 0 )
     172                {
     173                    char newExeName[CCHMAXPATH];
     174
     175                        if(DosSearchPath( SEARCH_CUR_DIRECTORY | SEARCH_ENVIRONMENT | SEARCH_IGNORENETERRS
    173176                                     , "WINDOWSPATH"           /* environment value */
    174177                                     , exeShortName            /* Name of file to look for */
    175                                      , exeName                 /* Result of the search     */
    176                                      , sizeof(exeName)         /* Length of search buffer  */
    177                                      );
     178                                     , newExeName              /* Result of the search     */
     179                                     , sizeof(newExeName)      /* Length of search buffer  */
     180                                     ) == NO_ERROR)
     181                        {
     182                            strcpy(exeName, newExeName);
     183                        }
    178184                }
    179185
Note: See TracChangeset for help on using the changeset viewer.