Merge pull request #494 from just-bank/fix-simobject-call

Fix return value conversion when using SimObject::call() method
This commit is contained in:
Brian Roberts 2021-06-15 12:30:08 -05:00 committed by GitHub
commit 43c403a30e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1451,9 +1451,9 @@ ConsoleValueRef Namespace::Entry::execute(S32 argc, ConsoleValueRef *argv, ExprE
case StringCallbackType:
return ConsoleValueRef::fromValue(CSTK.pushStackString(cb.mStringCallbackFunc(state->thisObject, argc, argv)));
case IntCallbackType:
return ConsoleValueRef::fromValue(CSTK.pushUINT((U32)cb.mBoolCallbackFunc(state->thisObject, argc, argv)));
return ConsoleValueRef::fromValue(CSTK.pushUINT((U32)cb.mIntCallbackFunc(state->thisObject, argc, argv)));
case FloatCallbackType:
return ConsoleValueRef::fromValue(CSTK.pushFLT((U32)cb.mBoolCallbackFunc(state->thisObject, argc, argv)));
return ConsoleValueRef::fromValue(CSTK.pushFLT((U32)cb.mFloatCallbackFunc(state->thisObject, argc, argv)));
case VoidCallbackType:
cb.mVoidCallbackFunc(state->thisObject, argc, argv);
return ConsoleValueRef();