From 55cb6675ccf7df1b347fab73c9cb23ee045e97c3 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Wed, 13 Jan 2016 22:51:53 +0100 Subject: [PATCH] IniFile: Initialize with default value if key does not exist. --- Source/Core/Common/IniFile.h | 2 ++ 1 file changed, 2 insertions(+) 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; }