[Script] Make index signed to keep consistency

This commit is contained in:
FutureRave 2021-11-13 20:46:58 +00:00
parent 4cb8cdfca3
commit 5c69267ba3
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955
2 changed files with 3 additions and 3 deletions

View File

@ -399,7 +399,7 @@ namespace Components
return Game::Scr_GetNumParam();
}
const char* Script::GetCodePosForParam(unsigned int index)
const char* Script::GetCodePosForParam(int index)
{
if (index >= Game::scrVmPub->outparamcount)
{
@ -407,7 +407,7 @@ namespace Components
return "";
}
const auto value = &Game::scrVmPub->top[0 - index];
const auto value = &Game::scrVmPub->top[-index];
if (value->type != Game::VAR_FUNCTION)
{

View File

@ -72,7 +72,7 @@ namespace Components
static unsigned int SetExpFogStub();
static const char* GetCodePosForParam(unsigned int index);
static const char* GetCodePosForParam(int index);
static void GetReplacedPos(const char* pos);
static void SetReplacedPos(const char* what, const char* with);
static void VMExecuteInternalStub();