fixed bug where format() on copy-back would not null terminate
This commit is contained in:
		@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user