Fix order of operations for parsing ini files.

This commit is contained in:
Jennifer Taylor 2019-06-30 22:23:47 -07:00 committed by Shaun Taylor
parent 4c5ea185cb
commit 2e919a6c2d
1 changed files with 2 additions and 2 deletions

View File

@ -205,13 +205,13 @@ launcher_program_t *Menu::LoadSettings( _TCHAR *ini_file, unsigned int *final_le
if (strncmp(buffer, "launch", 6) == 0) {
unsigned int loc = 6;
// Find equals sign after space
while (loc < buflen && buffer[loc] == ' ' || buffer[loc] == '\t' ) { loc++; }
while (loc < buflen && (buffer[loc] == ' ' || buffer[loc] == '\t')) { loc++; }
if (loc < buflen)
{
if (buffer[loc] == '=')
{
loc++;
while (loc < buflen && buffer[loc] == ' ' || buffer[loc] == '\t' ) { loc++; }
while (loc < buflen && (buffer[loc] == ' ' || buffer[loc] == '\t')) { loc++; }
if (loc < buflen)
{
char *launch = buffer + loc;