mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +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);
|
sq_pop(vm, 1);
|
||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
sq_tostring(vm, -1);
|
if (SQ_SUCCEEDED(sq_tostring(vm, -1)))
|
||||||
|
{
|
||||||
sq_getstringandsize(vm, -1, &sqErr, &size);
|
sq_getstringandsize(vm, -1, &sqErr, &size);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sqErr = _SC("unknown error");
|
||||||
|
size = strlen(sqErr);
|
||||||
|
sq_pushnull(vm);
|
||||||
|
}
|
||||||
sq_pop(vm, 2);
|
sq_pop(vm, 2);
|
||||||
return string(sqErr, static_cast< size_t >(size));
|
return string(sqErr, static_cast< size_t >(size));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user