isleapp: Fix iniFP to be in proper scope

This also fixes the missing parameter in `iniparser_dump_ini`
This commit is contained in:
AllMeatball 2025-05-12 15:47:35 -05:00
parent 801d6ae748
commit 96a0915837

View File

@ -581,8 +581,9 @@ bool IsleApp::LoadConfig()
iniparser_set(dict, "isle:Island Quality", "1");
iniparser_set(dict, "isle:Island Texture", "1");
iniparser_dump_ini(dict, );
iniparser_dump_ini(dict, iniFP);
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "New config written at '%s'", iniConfig);
fclose(iniFP);
}
const char* hdPath = iniparser_getstring(dict, "isle:diskpath", SDL_GetBasePath());
@ -639,7 +640,6 @@ bool IsleApp::LoadConfig()
m_savePath = new char[strlen(savePath) + 1];
strcpy(m_savePath, savePath);
fclose(iniFP);
iniparser_freedict(dict);
delete[] iniConfig;
SDL_free(prefPath);