From 9f1b1f1cad6bafbf1c757def0b7d94a65ea21729 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Thu, 12 Aug 2010 14:34:54 +0000 Subject: [PATCH] Use std::string on osx/unix as well as osx doesn't have strndup. Originally committed to SVN as r4735. --- aegisub/src/dialog_log.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aegisub/src/dialog_log.cpp b/aegisub/src/dialog_log.cpp index 5f030822b..53c9daef6 100644 --- a/aegisub/src/dialog_log.cpp +++ b/aegisub/src/dialog_log.cpp @@ -40,13 +40,14 @@ #include "config.h" #ifndef AGI_PRE +#include + #include #include #include #include #include #endif -#include #include #include "dialog_log.h" @@ -109,7 +110,7 @@ void LogWindow::EmitLog::Write(agi::log::SinkMessage *sm) { sm->file, sm->func, sm->line, - strndup(sm->message, sm->len)); + std::string(sm->message, sm->len)); #else wxString log = wxString::Format("%c %-6ld <%-25s> [%s:%s:%d] %s\n", agi::log::Severity_ID[sm->severity],