From a9d9335b20a0b708fae1b978f70348aec998356a Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 1 Apr 2014 21:49:16 -0400 Subject: textscreen: Use safe string functions. Define TXT_{StringCopy,StringConcat,snprintf,vsnprintf} as analogs of the m_misc.c versions so that the textscreen library does not need a dependency on the Doom code, and change all textscreen code to use these instead of unsafe functions. This fixes #372. --- textscreen/txt_desktop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'textscreen/txt_desktop.c') diff --git a/textscreen/txt_desktop.c b/textscreen/txt_desktop.c index 2316145f..31577ec8 100644 --- a/textscreen/txt_desktop.c +++ b/textscreen/txt_desktop.c @@ -263,7 +263,7 @@ void TXT_DrawASCIITable(void) n = y * 16 + x; TXT_GotoXY(x * 5, y); - sprintf(buf, "%02x ", n); + TXT_snprintf(buf, sizeof(buf), "%02x ", n); TXT_Puts(buf); // Write the character directly to the screen memory buffer: -- cgit v1.2.3