aboutsummaryrefslogtreecommitdiff
path: root/primedev/shared
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2024-01-24 02:29:20 +0100
committerGitHub <noreply@github.com>2024-01-24 02:29:20 +0100
commit3b7d9aaa95449a66be36a057aa49e35bcb8acec6 (patch)
tree2c772ba10530356a7bb4482fe61e207667081fc2 /primedev/shared
parentefff77f0941df9b6502f6c66a621c1c41a0d1e25 (diff)
parent7f84bdf8fd5c93286f000bc5f9314eab81128cee (diff)
downloadNorthstarLauncher-3b7d9aaa95449a66be36a057aa49e35bcb8acec6.tar.gz
NorthstarLauncher-3b7d9aaa95449a66be36a057aa49e35bcb8acec6.zip
Merge branch 'main' into feat/update-for-new-verified-json
Diffstat (limited to 'primedev/shared')
-rw-r--r--primedev/shared/exploit_fixes/exploitfixes.cpp4
-rw-r--r--primedev/shared/misccommands.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/primedev/shared/exploit_fixes/exploitfixes.cpp b/primedev/shared/exploit_fixes/exploitfixes.cpp
index 8064d5ac..44651b3c 100644
--- a/primedev/shared/exploit_fixes/exploitfixes.cpp
+++ b/primedev/shared/exploit_fixes/exploitfixes.cpp
@@ -262,7 +262,7 @@ bool, __fastcall, (const char* pModName)) // 48 83 EC 28 48 8B 0D ? ? ? ? 48 8D
// clang-format on
{
// somewhat temp, store the modname here, since we don't have a proper ptr in engine to it rn
- int iSize = strlen(pModName);
+ size_t iSize = strlen(pModName);
g_pModName = new char[iSize + 1];
strcpy(g_pModName, pModName);
@@ -323,7 +323,7 @@ bool, __fastcall, (CBaseClient* self, uint32_t unknown, const char* pCommandStri
"load_recent_checkpoint" // This is the instant-respawn exploit, literally just calls RespawnPlayer()
};
- int iCmdLength = strlen(tempCommand.Arg(0));
+ size_t iCmdLength = strlen(tempCommand.Arg(0));
bool bIsBadCommand = false;
for (auto& blockedCommand : blockedCommands)
diff --git a/primedev/shared/misccommands.cpp b/primedev/shared/misccommands.cpp
index 15da6767..648525b9 100644
--- a/primedev/shared/misccommands.cpp
+++ b/primedev/shared/misccommands.cpp
@@ -60,7 +60,7 @@ void ConCommand_cvar_setdefaultvalue(const CCommand& arg)
}
// unfortunately no way for us to not leak memory here, as default value might not be in writeable memory by default
- int nLen = strlen(arg.Arg(2));
+ size_t nLen = strlen(arg.Arg(2));
char* pBuf = new char[nLen + 1];
strncpy_s(pBuf, nLen + 1, arg.Arg(2), nLen);
@@ -83,7 +83,7 @@ void ConCommand_cvar_setvalueanddefaultvalue(const CCommand& arg)
}
// unfortunately no way for us to not leak memory here, as default value might not be in writeable memory by default
- int nLen = strlen(arg.Arg(2));
+ size_t nLen = strlen(arg.Arg(2));
char* pBuf = new char[nLen + 1];
strncpy_s(pBuf, nLen + 1, arg.Arg(2), nLen);