From db3b086a52b44b2d5960a25ef2f46317f4280934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Thu, 25 May 2023 12:46:27 +0200 Subject: [PATCH] Fix #10867, 8b93e45: Squirrel compile error exception type changed (#10869) --- src/3rdparty/squirrel/squirrel/sqcompiler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp index 5dd6ae733e..f29cf34485 100644 --- a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp +++ b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp @@ -182,12 +182,12 @@ public: #endif return true; } - catch (SQChar *compilererror) { + catch (const std::string &compilererror) { if(_raiseerror && _ss(_vm)->_compilererrorhandler) { - _ss(_vm)->_compilererrorhandler(_vm, compilererror, type(_sourcename) == OT_STRING?_stringval(_sourcename):"unknown", + _ss(_vm)->_compilererrorhandler(_vm, compilererror.c_str(), type(_sourcename) == OT_STRING ? _stringval(_sourcename) : "unknown", _lex._currentline, _lex._currentcolumn); } - _vm->_lasterror = SQString::Create(_ss(_vm), compilererror, -1); + _vm->_lasterror = SQString::Create(_ss(_vm), compilererror.c_str(), -1); return false; } }