From 798267d223f0c5b0d39e5b9674557e986d75169d Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 26 Dec 2014 17:29:13 -0600 Subject: [PATCH] Remove memcpy from "Unknown command" error printing --- src/c_dispatch.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp index 0719f5a90..7a6748fdc 100644 --- a/src/c_dispatch.cpp +++ b/src/c_dispatch.cpp @@ -694,12 +694,7 @@ void C_DoCommand (const char *cmd, int keynum) } else { - char cmdname[64]; - size_t minlen = MIN (len, 63); - - memcpy (cmdname, beg, minlen); - cmdname[len] = 0; - Printf ("Unknown command \"%s\"\n", cmdname); + Printf ("Unknown command \"%.*s\"\n", len, beg); } } }