diff --git a/r5dev/tier0/completion.cpp b/r5dev/tier0/completion.cpp index c1cd86b2..d978612c 100644 --- a/r5dev/tier0/completion.cpp +++ b/r5dev/tier0/completion.cpp @@ -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); }