mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-09-18 07:48:04 +02:00
Fixed potential crash with _NET_SetKey_f_CompletionFunc.
This commit is contained in:
@@ -576,9 +576,6 @@ void _VPK_Decompress_f_CompletionFunc(CCommand* cmd)
|
||||
|
||||
void _NET_SetKey_f_CompletionFunc(CCommand* cmd)
|
||||
{
|
||||
CCommand& args = *cmd; // Get reference.
|
||||
std::string firstArg = args[1]; // Get first arg.
|
||||
|
||||
std::int32_t argSize = *(std::int32_t*)((std::uintptr_t)cmd + 0x4);
|
||||
|
||||
if (argSize < 2) // Do we atleast have 2 arguments?
|
||||
@@ -586,6 +583,9 @@ void _NET_SetKey_f_CompletionFunc(CCommand* cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
CCommand& args = *cmd; // Get reference.
|
||||
std::string firstArg = args[1]; // Get first arg.
|
||||
|
||||
HNET_SetKey(firstArg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user