fix(Hooking->GetEventData): type char array allocation too small
This commit is contained in:
parent
51c0d0b8ee
commit
89151f5dda
@ -14,7 +14,7 @@ namespace big
|
|||||||
Player player = (Player)args[1];
|
Player player = (Player)args[1];
|
||||||
auto hash = args[0];
|
auto hash = args[0];
|
||||||
|
|
||||||
char type[16] = "";
|
char type[32] = "";
|
||||||
|
|
||||||
switch (hash)
|
switch (hash)
|
||||||
{
|
{
|
||||||
@ -95,10 +95,14 @@ namespace big
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int64_t kick_hash : kick_hashes)
|
||||||
|
if (hash == kick_hash)
|
||||||
|
strcpy(type, "General Kick");
|
||||||
|
|
||||||
if (strlen(type) != 0)
|
if (strlen(type) != 0)
|
||||||
{
|
{
|
||||||
char msg[128];
|
char msg[128];
|
||||||
strcpy(msg, "~g~BLOCKED EVENT~s~\nFrom <C>");
|
strcpy(msg, "~g~BLOCKED EVENT~s~\nFrom: <C>");
|
||||||
strcat(msg, g_pointers->m_get_player_name(player));
|
strcat(msg, g_pointers->m_get_player_name(player));
|
||||||
strcat(msg, "</C>\nEvent Type: ~b~");
|
strcat(msg, "</C>\nEvent Type: ~b~");
|
||||||
strcat(msg, type);
|
strcat(msg, type);
|
||||||
|
Reference in New Issue
Block a user