summaryrefslogtreecommitdiff
path: root/settings.cpp
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2018-09-28 22:54:05 -0400
committerPeter LaFosse <peter@vector35.com>2018-09-28 22:54:05 -0400
commit515381255191f35845e8c57059842741fcc652cd (patch)
treee62b554e4f25f9da7d3388941a9aeffd22b6d290 /settings.cpp
parent328281d02cc9ed281b47915c4b02e36328ad2bb5 (diff)
Namespace API cleanup
Diffstat (limited to 'settings.cpp')
-rw-r--r--settings.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/settings.cpp b/settings.cpp
index b5899e38..ca1e42a3 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -17,7 +17,10 @@ int64_t Setting::GetInteger(const std::string& pluginName, const std::string& na
std::string Setting::GetString(const std::string& pluginName, const std::string& name, const std::string& defaultValue)
{
- return BNSettingGetString(pluginName.c_str(), name.c_str(), defaultValue.c_str());
+ char* str = BNSettingGetString(pluginName.c_str(), name.c_str(), defaultValue.c_str());
+ string result(str);
+ BNFreeString(str);
+ return result;
}
double Setting::GetDouble(const std::string& pluginName, const std::string& name, double defaultValue)