From f2226e65cbcbc133d7c0c78909d665370934012e Mon Sep 17 00:00:00 2001 From: "SnepOMatic (Rhew)" Date: Mon, 10 Nov 2025 23:36:33 +0000 Subject: [PATCH] - Set defaults if ini exists, but empty. - Create a new dictionary object, not use null object. --- ISLE/isleapp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index 7b0fa23d..e8cde906 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -1074,7 +1074,7 @@ bool IsleApp::LoadConfig() // [library:config] // Load sane defaults if dictionary failed to load - if (!dict) { + if (!dict || dict->n == 0) { if (m_iniPath) { SDL_Log("Invalid config path '%s'", m_iniPath); return false; @@ -1094,7 +1094,7 @@ bool IsleApp::LoadConfig() } char buf[32]; - dict = iniparser_load(iniConfig.GetData()); + dict = dictionary_new(0); iniparser_set(dict, "isle", NULL); iniparser_set(dict, "isle:diskpath", SDL_GetBasePath());