fixed bug where format() on copy-back would not null terminate

This commit is contained in:
David Anderson 2006-02-24 00:09:33 +00:00
parent 631e709471
commit 6997c780d9

View File

@ -507,7 +507,7 @@ static cell AMX_NATIVE_CALL format(AMX *amx, cell *params) /* 3 param */
{
/* copy back */
cell *old = get_amxaddr(amx, params[1]);
memcpy(old, g_cpbuf, total * sizeof(cell));
memcpy(old, g_cpbuf, (total+1) * sizeof(cell));
}
return total;
}