From fea596567944fba8d9d4ead62d948db14690fdf1 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 15 May 2005 18:50:55 +0000 Subject: (svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes. --- vehicle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vehicle.c') diff --git a/vehicle.c b/vehicle.c index a705ed93b..82a2bf719 100644 --- a/vehicle.c +++ b/vehicle.c @@ -1660,7 +1660,7 @@ int32 CmdNameVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (!CheckOwnership(v->owner)) return CMD_ERROR; - str = AllocateNameUnique((const char*)_decode_parameters, 2); + str = AllocateNameUnique(_cmd_text, 2); if (str == 0) return CMD_ERROR; if (flags & DC_EXEC) { -- cgit v1.2.3-70-g09d2