mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-26 13:48:03 +03:00
fixed bug where format() on copy-back would not null terminate
This commit is contained in:
parent
631e709471
commit
6997c780d9
@ -507,7 +507,7 @@ static cell AMX_NATIVE_CALL format(AMX *amx, cell *params) /* 3 param */
|
|||||||
{
|
{
|
||||||
/* copy back */
|
/* copy back */
|
||||||
cell *old = get_amxaddr(amx, params[1]);
|
cell *old = get_amxaddr(amx, params[1]);
|
||||||
memcpy(old, g_cpbuf, total * sizeof(cell));
|
memcpy(old, g_cpbuf, (total+1) * sizeof(cell));
|
||||||
}
|
}
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user