aboutsummaryrefslogtreecommitdiffstats
path: root/win/vncconfig/Legacy.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win/vncconfig/Legacy.cxx')
-rw-r--r--win/vncconfig/Legacy.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/win/vncconfig/Legacy.cxx b/win/vncconfig/Legacy.cxx
index e5433691..c9c5e697 100644
--- a/win/vncconfig/Legacy.cxx
+++ b/win/vncconfig/Legacy.cxx
@@ -62,15 +62,14 @@ void LegacyPage::LoadPrefs()
regKey.setString("Log", logSetting);
}
- CharArray authHosts;
- authHosts.buf = winvnc3.getString("AuthHosts", 0);
- if (authHosts.buf) {
+ std::string authHosts = winvnc3.getString("AuthHosts", "");
+ if (!authHosts.empty()) {
CharArray newHosts;
newHosts.buf = strDup("");
// Reformat AuthHosts to Hosts. Wish I'd left the format the same. :( :( :(
try {
- CharArray tmp(authHosts.buf);
+ CharArray tmp(strDup(authHosts.c_str()));
while (tmp.buf) {
// Split the AuthHosts string into patterns to match