Changeset 469 for trunk/Lucide/gui/lcd.c


Ignore:
Timestamp:
Jan 19, 2011, 11:24:48 AM (10 years ago)
Author:
dmik
Message:

launcher: Fixed using wrong buffer in r467.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/gui/lcd.c

    r467 r469  
    4444//
    4545
    46 char lucideDir[ CCHMAXPATH ] = "";
    47 
    4846typedef APIRET (APIENTRY *LMain)(int argc, char **argv);
    4947
     
    5250    int result = 1;
    5351    char *last_slash;
    54     CHAR modName[ CCHMAXPATH + 15 /*";%BEGINLIBPATH%"*/ ] = { 0 };
     52    char buf[ CCHMAXPATH + 15 /*";%BEGINLIBPATH%"*/ ] = { 0 };
    5553    HMODULE hmod = NULLHANDLE;
    5654    APIRET rc = 0;
     
    6462
    6563    // fill lucide dir
    66     strcpy( lucideDir, argv[0] );
    67     if ( ( last_slash = strrchr( lucideDir, '\\' ) ) == NULL )
     64    strcpy( buf, argv[0] );
     65    if ( ( last_slash = strrchr( buf, '\\' ) ) == NULL )
    6866    {
    6967        return 1;
     
    7472    }
    7573    // retain the previous BEGINLIBPATH setting
    76     strcat(lucideDir, ";%BEGINLIBPATH%");
     74    strcat( buf, ";%BEGINLIBPATH%" );
    7775
    7876    // set beginlibpath
    79     DosSetExtLIBPATH( lucideDir, BEGIN_LIBPATH );
     77    DosSetExtLIBPATH( buf, BEGIN_LIBPATH );
    8078
    81     rc = DosLoadModule( modName, sizeof( modName ), "Lucide", &hmod );
     79    rc = DosLoadModule( buf, sizeof( buf ), "Lucide", &hmod );
    8280    if ( rc == 0 )
    8381    {
     
    9997        hmq = WinCreateMsgQueue( hab, 0 );
    10098
    101         if ( modName[0] == 0 ) { // No modulename
     99        if ( buf[0] == 0 ) { // No modulename
    102100            snprintf( msg, sizeof( msg ), "Error loading Lucide.dll: SYS%04u", rc );
    103101        }
     
    105103            snprintf( msg, sizeof( msg ),
    106104                      "Error loading Lucide.dll: can't find module '%s' (SYS%04u)",
    107                       modName, rc );
     105                      buf, rc );
    108106        }
    109107        WinMessageBox( HWND_DESKTOP, NULLHANDLE, msg, NULL, 1, MB_OK | MB_MOVEABLE );
Note: See TracChangeset for help on using the changeset viewer.