@@ -56,14 +56,14 @@ CScriptThread::CScriptThread(CScriptEngine* scriptEngine, LPCSTR caNamespaceName
5656 l_iErrorCode = lua_pcall (engineLua, 0 , 0 , 0 );
5757 if (l_iErrorCode)
5858 {
59- CScriptEngine::print_output (engineLua, * m_script_name, l_iErrorCode);
59+ CScriptEngine::print_output (engineLua, m_script_name. c_str () , l_iErrorCode);
6060 CScriptEngine::on_error (engineLua);
6161 return ;
6262 }
6363 }
6464 else
6565 {
66- CScriptEngine::print_output (engineLua, * m_script_name, l_iErrorCode);
66+ CScriptEngine::print_output (engineLua, m_script_name. c_str () , l_iErrorCode);
6767 CScriptEngine::on_error (engineLua);
6868 return ;
6969 }
@@ -107,7 +107,7 @@ bool CScriptThread::update()
107107 int l_iErrorCode = lua_resume (lua (), 0 );
108108 if (l_iErrorCode && l_iErrorCode != LUA_YIELD)
109109 {
110- CScriptEngine::print_output (lua (), * script_name (), l_iErrorCode);
110+ CScriptEngine::print_output (lua (), script_name (). c_str (), l_iErrorCode);
111111 CScriptEngine::on_error (scriptEngine->lua ());
112112#ifdef DEBUG
113113 print_stack (lua ());
@@ -121,14 +121,14 @@ bool CScriptThread::update()
121121#ifdef DEBUG
122122 if (m_current_stack_level)
123123 {
124- CScriptEngine::print_output (lua (), * script_name (), l_iErrorCode);
124+ CScriptEngine::print_output (lua (), script_name (). c_str (), l_iErrorCode);
125125 CScriptEngine::on_error (scriptEngine->lua ());
126126 // print_stack(lua());
127127 }
128128#endif
129129 m_active = false ;
130130#ifdef DEBUG
131- scriptEngine->script_log (LuaMessageType::Info, " Script %s is finished!" , * m_script_name);
131+ scriptEngine->script_log (LuaMessageType::Info, " Script %s is finished!" , m_script_name. c_str () );
132132#endif
133133 }
134134 else
0 commit comments