Small fix

This commit is contained in:
Federico Cecchetto 2022-08-30 19:37:46 +02:00
parent 4a3d8c3252
commit 1aa2a0ce0c
2 changed files with 4 additions and 6 deletions

View File

@ -356,9 +356,7 @@ namespace gsc
return {};
}
const auto value = &game::scr_VmPub->top[-index];
return scripting::script_value(*value);
return game::scr_VmPub->top[-index];
}
auto function_id_start = 0x320;
@ -379,7 +377,7 @@ namespace gsc
void execute_custom_function(scripting::script_function function)
{
bool error = false;
auto error = false;
try
{
@ -400,7 +398,7 @@ namespace gsc
void vm_call_builtin_stub(scripting::script_function function)
{
bool custom = false;
auto custom = false;
{
custom = functions.find(function) != functions.end();
}

View File

@ -64,7 +64,7 @@ namespace scripting
static const auto function_table = &gsc::func_table;
static const auto method_table = 0x14B155890;
if (index < 0x320)
if (index < 0x1000)
{
return reinterpret_cast<script_function*>(function_table)[index - 1];
}