summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2016-01-13 22:51:53 +0100
committerJules Blok <jules.blok@gmail.com>2016-01-13 22:51:53 +0100
commit55cb6675ccf7df1b347fab73c9cb23ee045e97c3 (patch)
tree31bb8dc102b266d4fbe579c1e28762350932c382 /Source
parent8ee93fc4fa2eca1a2faa3df965dcbd2044dc4225 (diff)
IniFile: Initialize with default value if key does not exist.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/IniFile.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Common/IniFile.h b/Source/Core/Common/IniFile.h
index 6f16d74306..ed20cd6fa0 100644
--- a/Source/Core/Common/IniFile.h
+++ b/Source/Core/Common/IniFile.h
@@ -123,6 +123,8 @@ public:
{
if (Exists(sectionName, key))
return GetOrCreateSection(sectionName)->Get(key, value, defaultValue);
+ else
+ *value = defaultValue;
return false;
}