From 83a319d17dcafef7c843c41acad8fae9ecf9d784 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 24 Mar 2014 21:22:33 +0100
Subject: [PATCH] Added -Wformat-security to gcc options, fixed point found by
 it.

---
 Makefile                 | 2 +-
 src/client/keybindings.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 6a6fe5b..063bf2f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 CC=gcc
-CFLAGS=-Wall -Wextra -Werror -g
+CFLAGS=-Wall -Wextra -Werror -Wformat-security -g
 TARGET_SERVER=roguelike-server
 TARGET_CLIENT=roguelike-client
 SRCDIR=src
diff --git a/src/client/keybindings.c b/src/client/keybindings.c
index f148afa..b23a47e 100644
--- a/src/client/keybindings.c
+++ b/src/client/keybindings.c
@@ -57,7 +57,7 @@ static uint8_t try_keycode(uint16_t keycode_given, char * keyname,
 {
     if (keycode_given == keycode_match)
     {
-        sprintf(keyname, keyname_match);
+        sprintf(keyname, "%s", keyname_match);
         return 1;
     }
     return 0;
-- 
2.30.2