mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Update sqratUtil.h
This commit is contained in:
parent
f69769d32b
commit
4a238bc611
@ -519,8 +519,16 @@ inline string LastErrorString(HSQUIRRELVM vm) {
|
||||
sq_pop(vm, 1);
|
||||
return string();
|
||||
}
|
||||
sq_tostring(vm, -1);
|
||||
sq_getstringandsize(vm, -1, &sqErr, &size);
|
||||
if (SQ_SUCCEEDED(sq_tostring(vm, -1)))
|
||||
{
|
||||
sq_getstringandsize(vm, -1, &sqErr, &size);
|
||||
}
|
||||
else
|
||||
{
|
||||
sqErr = _SC("unknown error");
|
||||
size = strlen(sqErr);
|
||||
sq_pushnull(vm);
|
||||
}
|
||||
sq_pop(vm, 2);
|
||||
return string(sqErr, static_cast< size_t >(size));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user