summaryrefslogtreecommitdiff
path: root/textscreen/txt_window_action.c
diff options
context:
space:
mode:
authorSimon Howard2014-04-01 21:49:16 -0400
committerSimon Howard2014-04-01 21:49:16 -0400
commita9d9335b20a0b708fae1b978f70348aec998356a (patch)
tree9d775843fddbffaa9babdf54221b0ac98105dc91 /textscreen/txt_window_action.c
parent17c14e1fad6dc277a6e58e4f421d5c65e210d1fe (diff)
downloadchocolate-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_window_action.c')
-rw-r--r--textscreen/txt_window_action.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/textscreen/txt_window_action.c b/textscreen/txt_window_action.c
index f195f06f..8a09409b 100644
--- a/textscreen/txt_window_action.c
+++ b/textscreen/txt_window_action.c
@@ -35,7 +35,7 @@ static void TXT_WindowActionSizeCalc(TXT_UNCAST_ARG(action))
TXT_CAST_ARG(txt_window_action_t, action);
char buf[10];
- TXT_GetKeyDescription(action->key, buf);
+ TXT_GetKeyDescription(action->key, buf, sizeof(buf));
// Width is label length, plus key description length, plus '='
// and two surrounding spaces.
@@ -49,7 +49,7 @@ static void TXT_WindowActionDrawer(TXT_UNCAST_ARG(action))
TXT_CAST_ARG(txt_window_action_t, action);
char buf[10];
- TXT_GetKeyDescription(action->key, buf);
+ TXT_GetKeyDescription(action->key, buf, sizeof(buf));
if (TXT_HoveringOverWidget(action))
{