diff options
author | David Robillard <d@drobilla.net> | 2014-08-08 00:49:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-08-08 00:49:19 +0000 |
commit | f368c50e3798bb21a309310ab333ce4677124b7e (patch) | |
tree | ca3c6151857b592524a340381c6ad960462c1db7 | |
parent | 8a135425c9c74f1d886724ff3281c04b97b97412 (diff) | |
download | ingen-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
-rw-r--r-- | src/Log.cpp | 6 |
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; } |