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
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}
}