Fix check
This commit is contained in:
parent
a8eb88ce2c
commit
1ac3ba964d
|
@ -155,9 +155,7 @@ bool configSetString(Config* config, const char* sectionKey, const char* key, co
|
||||||
|
|
||||||
int sectionIndex = dictionaryGetIndexByKey(config, sectionKey);
|
int sectionIndex = dictionaryGetIndexByKey(config, sectionKey);
|
||||||
if (sectionIndex == -1) {
|
if (sectionIndex == -1) {
|
||||||
// FIXME: Looks like a bug, this function never returns -1, which will
|
if (!configEnsureSectionExists(config, sectionKey)) {
|
||||||
// eventually lead to crash.
|
|
||||||
if (configEnsureSectionExists(config, sectionKey) == -1) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sectionIndex = dictionaryGetIndexByKey(config, sectionKey);
|
sectionIndex = dictionaryGetIndexByKey(config, sectionKey);
|
||||||
|
|
Loading…
Reference in New Issue