From 82038bb504aaa5cf5c0d853b8e81d38ad208309d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 3 Jun 2011 22:18:08 +0900 Subject: [PATCH] Remove another stack character buffer. While it was probably safe (snprintf was being used correctly) I prefer to avoid the issue completely and centralize any potential problems. --- nq/source/cl_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nq/source/cl_main.c b/nq/source/cl_main.c index 777bd57c5..e65b370df 100644 --- a/nq/source/cl_main.c +++ b/nq/source/cl_main.c @@ -327,8 +327,6 @@ CL_SignonReply (void) void CL_NextDemo (void) { - char str[1024]; - if (cls.demonum == -1) return; // don't play demos @@ -341,8 +339,7 @@ CL_NextDemo (void) } } - snprintf (str, sizeof (str), "playdemo %s\n", cls.demos[cls.demonum]); - Cbuf_InsertText (host_cbuf, str); + Cbuf_InsertText (host_cbuf, va ("playdemo %s\n", cls.demos[cls.demonum])); cls.demonum++; }