Skip to content

Commit 762f9ad

Browse files
committed
up
1 parent de77591 commit 762f9ad

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kbe/src/lib/helper/debug_helper.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,13 +515,11 @@ void DebugHelper::script_msg(const std::string& s)
515515
{
516516
KBEngine::thread::ThreadGuard tg(&this->logMutex);
517517

518-
const size_t len = 33; // strlen("Traceback (most recent call last)");
519-
520-
if(s.size() > len)
518+
if(s.size() > 33 /* strlen("Traceback (most recent call last)" */)
521519
{
522520
if(s[0] == 'T' && s[10] == '(')
523521
{
524-
if(s.substr(0, len) == "Traceback (most recent call last)")
522+
if(s.substr(0, 33) == "Traceback (most recent call last)")
525523
setScriptMsgType(log4cxx::ScriptLevel::SCRIPT_ERR);
526524
}
527525
}

0 commit comments

Comments
 (0)