summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-09-14 00:29:32 +0000
committerChris Wilson <chris+github@qwirx.com>2008-09-14 00:29:32 +0000
commit842217a354cdd9c0b27b11f61725d0eca91eeba6 (patch)
treea2d266eb6f44ec6775b615be145f6fa34f567620 /lib
parente5717c428009d7702ce5d8bf65217f759f114294 (diff)
Compile fix for [2285].
Diffstat (limited to 'lib')
-rw-r--r--lib/win32/emu.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/win32/emu.cpp b/lib/win32/emu.cpp
index aeacf344..bd7701ae 100644
--- a/lib/win32/emu.cpp
+++ b/lib/win32/emu.cpp
@@ -1417,8 +1417,13 @@ void openlog(const char * daemonName, int, int)
{
}
- std::string name = "Box Backup (" + daemonName + ")";
- BOOL success = AddEventSource(name.c_str(), 0);
+ std::string nameStr = "Box Backup (";
+ nameStr += daemonName;
+ nameStr += ")";
+
+ char* name = strdup(nameStr.c_str());
+ BOOL success = AddEventSource(name, 0);
+ free(name);
if (!success)
{