diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-04-30 16:57:31 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-04-30 16:57:31 +0200 |
commit | 908dceb882723460cde35ec8ef22927b702ab874 (patch) | |
tree | 0598a9cb5d720c66c619fd350d64453490b35143 /src/log.cpp | |
parent | 8a67e721880959b431d220e2d1fd5b60a4f11ad7 (diff) | |
parent | 0b1c6eb3c4941dc2d47ad3207bab4509ae1014cc (diff) | |
download | mana-908dceb882723460cde35ec8ef22927b702ab874.tar.gz mana-908dceb882723460cde35ec8ef22927b702ab874.tar.bz2 mana-908dceb882723460cde35ec8ef22927b702ab874.tar.xz mana-908dceb882723460cde35ec8ef22927b702ab874.zip |
Merge branch '0.5'
Conflicts:
CMakeLists.txt
po/fi.po
po/fr.po
src/gui/skilldialog.cpp
src/localplayer.cpp
src/net/manaserv/generalhandler.cpp
src/net/tmwa/buysellhandler.cpp
src/net/tmwa/generalhandler.cpp
src/net/tmwa/playerhandler.cpp
src/net/tmwa/specialhandler.cpp
src/winver.h
Diffstat (limited to 'src/log.cpp')
-rw-r--r-- | src/log.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/log.cpp b/src/log.cpp index a147c107..bb8a78bb 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -60,12 +60,13 @@ void Logger::setLogFile(const std::string &logFilename) void Logger::log(const char *log_text, ...) { - char* buf = new char[1024]; + const size_t bufSize = 1024; + char* buf = new char[bufSize]; va_list ap; // Use a temporary buffer to fill in the variables va_start(ap, log_text); - vsprintf(buf, log_text, ap); + vsnprintf(buf, bufSize, log_text, ap); va_end(ap); // Get the current system time |