1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-21 20:27:13 +01:00

Update StackStrF to initialize without a default VM.

This commit is contained in:
Sandu Liviu Catalin 2018-10-23 22:16:54 +03:00
parent b685d4bf0c
commit 112d4828bb

View File

@ -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?