Fix #10867, 8b93e45: Squirrel compile error exception type changed (#10869)

This commit is contained in:
Loïc Guilloux 2023-05-25 12:46:27 +02:00 committed by GitHub
parent b133328737
commit db3b086a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,12 +182,12 @@ public:
#endif #endif
return true; return true;
} }
catch (SQChar *compilererror) { catch (const std::string &compilererror) {
if(_raiseerror && _ss(_vm)->_compilererrorhandler) { 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); _lex._currentline, _lex._currentcolumn);
} }
_vm->_lasterror = SQString::Create(_ss(_vm), compilererror, -1); _vm->_lasterror = SQString::Create(_ss(_vm), compilererror.c_str(), -1);
return false; return false;
} }
} }