Skip to content

Commit

Permalink
fix ini reader regression
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jan 8, 2024
1 parent 7551e78 commit 546f220
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions includes/CLODLightManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,10 @@ bool CLODLightManager::IsModelALamppost(unsigned short nModel)
void CLODLightManager::LoadDatFile()
{
CIniReader iniReader("");
char* DataFilePath = (char*)iniReader.GetIniPath().c_str();
char* tempPointer;
tempPointer = strrchr(DataFilePath, '.');
*tempPointer = '\0';
strcat(DataFilePath, ".dat");
auto DataFilePath = iniReader.GetIniPath();
DataFilePath.replace_extension(".dat");

if (FILE* hFile = CFileMgr::OpenFile(DataFilePath, "r"))
if (FILE* hFile = CFileMgr::OpenFile(DataFilePath.string().c_str(), "r"))
{
unsigned short nModel = 0xFFFF, nCurIndexForModel = 0;

Expand Down

0 comments on commit 546f220

Please sign in to comment.