mirror of
https://github.com/LIV2/WinUAE.git
synced 2025-12-06 00:12:52 +00:00
Fix ini whole section delete.
This commit is contained in:
parent
0c65b8bdbd
commit
aab96d084e
6
ini.cpp
6
ini.cpp
@ -565,6 +565,7 @@ bool ini_addstring(struct ini_data *ini, const TCHAR *section, const TCHAR *key,
|
||||
|
||||
bool ini_delete(struct ini_data *ini, const TCHAR *section, const TCHAR *key)
|
||||
{
|
||||
bool deleted = false;
|
||||
for (int c = 0; c < ini->inilines; c++) {
|
||||
struct ini_line *il = ini->inidata[c];
|
||||
if (il && !_tcsicmp(section, il->section) && (key == NULL || !_tcsicmp(key, il->key))) {
|
||||
@ -574,9 +575,8 @@ bool ini_delete(struct ini_data *ini, const TCHAR *section, const TCHAR *key)
|
||||
xfree(il);
|
||||
ini->inidata[c] = NULL;
|
||||
ini->modified = true;
|
||||
return true;
|
||||
deleted = true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return deleted;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user