diff options
author | Simon Howard | 2014-04-01 21:49:16 -0400 |
---|---|---|
committer | Simon Howard | 2014-04-01 21:49:16 -0400 |
commit | a9d9335b20a0b708fae1b978f70348aec998356a (patch) | |
tree | 9d775843fddbffaa9babdf54221b0ac98105dc91 /textscreen/txt_desktop.c | |
parent | 17c14e1fad6dc277a6e58e4f421d5c65e210d1fe (diff) | |
download | chocolate-doom-a9d9335b20a0b708fae1b978f70348aec998356a.tar.gz chocolate-doom-a9d9335b20a0b708fae1b978f70348aec998356a.tar.bz2 chocolate-doom-a9d9335b20a0b708fae1b978f70348aec998356a.zip |
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.
Diffstat (limited to 'textscreen/txt_desktop.c')
-rw-r--r-- | textscreen/txt_desktop.c | 2 |
1 files changed, 1 insertions, 1 deletions
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: |