Skip to content
Snippets Groups Projects
Commit 57d4c080 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix the removal of "main.ini" filename from CtrlDir path, if supplied

Converting the path to UPPER case and then comparing against a lowercase
string would never work.

Bug introduced in commit 6edc0270, reported by xbit (XBITBBS)
parent 1fe1adc1
No related branches found
No related tags found
No related merge requests found
......@@ -1894,7 +1894,7 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
CtrlDirectory=CtrlPathDialog->Edit->Text;
delete CtrlPathDialog;
}
if(CtrlDirectory.UpperCase().AnsiPos("main.ini"))
if(CtrlDirectory.LowerCase().AnsiPos("main.ini"))
CtrlDirectory.SetLength(CtrlDirectory.Length()-8);
SAFECOPY(global.ctrl_dir,CtrlDirectory.c_str());
memset(&cfg,0,sizeof(cfg));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment