mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-06-16 06:47:10 +02:00
Update StackStrF to initialize without a default VM.
This commit is contained in:
@@ -1556,7 +1556,7 @@ struct StackStrF
|
|||||||
, mLen(0)
|
, mLen(0)
|
||||||
, mRes(SQ_OK)
|
, mRes(SQ_OK)
|
||||||
, mObj()
|
, mObj()
|
||||||
, mVM(DefaultVM::Get())
|
, mVM(nullptr)
|
||||||
, mIdx(-1)
|
, mIdx(-1)
|
||||||
{
|
{
|
||||||
sq_resetobject(&mObj); // Reset the converted value object
|
sq_resetobject(&mObj); // Reset the converted value object
|
||||||
@@ -1570,7 +1570,7 @@ struct StackStrF
|
|||||||
, mLen(N)
|
, mLen(N)
|
||||||
, mRes(SQ_OK)
|
, mRes(SQ_OK)
|
||||||
, mObj()
|
, mObj()
|
||||||
, mVM(DefaultVM::Get())
|
, mVM(nullptr)
|
||||||
, mIdx(-1)
|
, mIdx(-1)
|
||||||
{
|
{
|
||||||
sq_resetobject(&mObj); // Reset the converted value object
|
sq_resetobject(&mObj); // Reset the converted value object
|
||||||
@@ -1639,6 +1639,11 @@ struct StackStrF
|
|||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
SQRESULT Proc(bool fmt = false, bool dummy = false)
|
SQRESULT Proc(bool fmt = false, bool dummy = false)
|
||||||
{
|
{
|
||||||
|
// If there's no virtual machine, just ignore the request
|
||||||
|
if (mVM == nullptr)
|
||||||
|
{
|
||||||
|
return SQ_OK;
|
||||||
|
}
|
||||||
// Reset the converted value object
|
// Reset the converted value object
|
||||||
sq_resetobject(&mObj);
|
sq_resetobject(&mObj);
|
||||||
// is this a dummy request?
|
// is this a dummy request?
|
||||||
|
|||||||
Reference in New Issue
Block a user