Ignore:
Timestamp:
Aug 27, 2000, 5:25:42 AM (25 years ago)
Author:
bird
Message:

Corrected bug in PROFILE_LoadOdinIni.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/profile.cpp

    r3804 r4098  
    1 /* $Id: profile.cpp,v 1.23 2000-07-06 21:18:44 sandervl Exp $ */
     1/* $Id: profile.cpp,v 1.24 2000-08-27 03:25:42 bird Exp $ */
    22
    33/*
     
    3333#define DBG_LOCALLOG    DBG_profile
    3434#include "dbglocal.h"
     35
     36#include "initterm.h"
    3537
    3638ODINDEBUGCHANNEL(PROFILE)
     
    967969      strncpy(PROFILE_OdinIniUsed,p,MAX_PATHNAME_LEN);
    968970      PROFILE_OdinIniUsed[MAX_PATHNAME_LEN-1] = 0;
    969     } 
     971    }
    970972    else
    971973    {
     974      #if 0 /* Aug 27 2000 4:26am: Why not use the global kernel32Path
     975             *                (LoadLibrary may cause harm if used...) */
    972976      HINSTANCE hInstance = LoadLibraryA("KERNEL32.DLL");
    973977      GetModuleFileNameA(hInstance,PROFILE_OdinIniUsed,sizeof(PROFILE_OdinIniUsed));
    974978      FreeLibrary(hInstance);
    975979      strcpy(strrchr(PROFILE_OdinIniUsed,'\\')+1,ODINININAME);
    976       f = fopen(PROFILE_OdinIniUsed,"r");
     980      #else
     981      strcpy(PROFILE_OdinIniUsed, kernel32Path);
     982      strcat(PROFILE_OdinIniUsed, ODINININAME);
     983      #endif
     984      f = fopen(PROFILE_OdinIniUsed, "r");
    977985      PROFILE_OdinProfile = PROFILE_Load(f);
    978986      fclose(f);
Note: See TracChangeset for help on using the changeset viewer.