fix lua logging when lua gives a null string
This commit is contained in:
parent
92052e1506
commit
53eac42935
1 changed files with 10 additions and 4 deletions
|
@ -78,16 +78,22 @@ protected:
|
|||
{}
|
||||
|
||||
inline command_log & operator<< (const std::string & str) {
|
||||
return *this << str.c_str();
|
||||
}
|
||||
|
||||
inline command_log & operator<< (char const* str) {
|
||||
log_ << str;
|
||||
if (external_log_) {
|
||||
(*external_log_) << str;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline command_log & operator<< (char const* str) {
|
||||
if (str != NULL) {
|
||||
log_ << str;
|
||||
if (external_log_) {
|
||||
(*external_log_) << str;
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
command_log cmd_log_;
|
||||
|
|
Loading…
Add table
Reference in a new issue