From: Christian Heller Date: Mon, 24 Mar 2014 20:22:33 +0000 (+0100) Subject: Added -Wformat-security to gcc options, fixed point found by it. X-Git-Tag: tce~811 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/condition?a=commitdiff_plain;h=83a319d17dcafef7c843c41acad8fae9ecf9d784;p=plomrogue Added -Wformat-security to gcc options, fixed point found by it. --- 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;