summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-08-08 00:49:19 +0000
committerDavid Robillard <d@drobilla.net>2014-08-08 00:49:19 +0000
commitf368c50e3798bb21a309310ab333ce4677124b7e (patch)
treeca3c6151857b592524a340381c6ad960462c1db7 /src
parent8a135425c9c74f1d886724ff3281c04b97b97412 (diff)
downloadingen-f368c50e3798bb21a309310ab333ce4677124b7e.tar.gz
ingen-f368c50e3798bb21a309310ab333ce4677124b7e.tar.bz2
ingen-f368c50e3798bb21a309310ab333ce4677124b7e.zip
Don't pass dynamic string as format string to log printf.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5417 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/Log.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Log.cpp b/src/Log.cpp
index 6f8fe841..6b169ec9 100644
--- a/src/Log.cpp
+++ b/src/Log.cpp
@@ -39,7 +39,7 @@ void
Log::error(const std::string& msg)
{
if (_log) {
- _log->printf(_log->handle, _uris.log_Error, msg.c_str());
+ _log->printf(_log->handle, _uris.log_Error, "%s", msg.c_str());
} else {
std::cerr << ANSI_RED << msg << ANSI_RESET;
}
@@ -49,7 +49,7 @@ void
Log::warn(const std::string& msg)
{
if (_log) {
- _log->printf(_log->handle, _uris.log_Warning, msg.c_str());
+ _log->printf(_log->handle, _uris.log_Warning, "%s", msg.c_str());
} else {
std::cerr << ANSI_YELLOW << msg << ANSI_RESET;
}
@@ -59,7 +59,7 @@ void
Log::info(const std::string& msg)
{
if (_log) {
- _log->printf(_log->handle, _uris.log_Note, msg.c_str());
+ _log->printf(_log->handle, _uris.log_Note, "%s", msg.c_str());
} else {
std::cout << msg;
}