mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fixed potential crash with _NET_SetKey_f_CompletionFunc.
This commit is contained in:
parent
c81aca28de
commit
0ca5b5ae35
@ -576,9 +576,6 @@ void _VPK_Decompress_f_CompletionFunc(CCommand* cmd)
|
|||||||
|
|
||||||
void _NET_SetKey_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);
|
std::int32_t argSize = *(std::int32_t*)((std::uintptr_t)cmd + 0x4);
|
||||||
|
|
||||||
if (argSize < 2) // Do we atleast have 2 arguments?
|
if (argSize < 2) // Do we atleast have 2 arguments?
|
||||||
@ -586,6 +583,9 @@ void _NET_SetKey_f_CompletionFunc(CCommand* cmd)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CCommand& args = *cmd; // Get reference.
|
||||||
|
std::string firstArg = args[1]; // Get first arg.
|
||||||
|
|
||||||
HNET_SetKey(firstArg);
|
HNET_SetKey(firstArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user