Small change

This commit is contained in:
Federico Cecchetto 2022-03-11 22:07:16 +01:00
parent a0320455ae
commit 01874769b9

View File

@ -48,11 +48,9 @@ namespace ui_scripting
{
return hksi_lual_error_hook.invoke<void>(s, formatted.data());
}
else
{
throw std::runtime_error(formatted);
}
}
int hksi_hks_error_stub(game::hks::lua_State* s, int a2)
{
@ -60,20 +58,17 @@ namespace ui_scripting
{
return hksi_hks_error_hook.invoke<int>(s, a2);
}
else
{
throw std::runtime_error("unknown error");
}
}
int lui_error_stub(game::hks::lua_State* s)
void lui_error_stub(game::hks::lua_State* s)
{
if (!error_hook_enabled)
{
return lui_error_hook.invoke<int>(s);
lui_error_hook.invoke<void>(s);
}
else
{
const auto count = static_cast<int>(s->m_apistack.top - s->m_apistack.base);
const auto arguments = get_return_values(count);
@ -85,7 +80,6 @@ namespace ui_scripting
throw std::runtime_error(error_str);
}
}
void* hks_start_stub(char a1)
{