diff options
author | QAston <none@none> | 2009-07-28 23:45:03 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-28 23:45:03 +0200 |
commit | 06d0560f152824a0bbd4488883eff682d54c96c8 (patch) | |
tree | 058d6b3e6b5c6225cee93361b04855011d838006 | |
parent | 6bb0ff8948b6e9b3a9480a2307f88a53a0ae19f1 (diff) |
*Minor cleanup in Log::outDB - by XTZGZoReX.
--HG--
branch : trunk
-rw-r--r-- | src/shared/Log.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index 0f1138279ff..8cc2dff504d 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -353,14 +353,16 @@ std::string Log::GetTimestampStr() void Log::outDB( LogTypes type, const char * str ) { - if(!str || std::string(str).empty() || type >= MAX_LOG_TYPES) - return; + if (!str || type >= MAX_LOG_TYPES) + return; std::string new_str(str); + if (new_str.empty()) + return; LoginDatabase.escape_string(new_str); LoginDatabase.PExecute("INSERT INTO logs (time, realm, type, string) " - "VALUES (" UI64FMTD ", %u, %u, '%s');", uint64(time(0)), realm, (uint32)type, new_str.c_str()); + "VALUES (" UI64FMTD ", %u, %u, '%s');", uint64(time(0)), realm, type, new_str.c_str()); } void Log::outString( const char * str, ... ) |