From: Christian Heller Date: Sun, 12 May 2013 21:26:21 +0000 (+0200) Subject: Minor code restyling. X-Git-Tag: tce~1310 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Byoutube_prefix%7D%7D%7B%7Bvideo_id%7D%7D?a=commitdiff_plain;h=838e77016ac35c89125f6885f82938d8d7d7080a;p=plomrogue Minor code restyling. --- diff --git a/roguelike.c b/roguelike.c index 002b875..a9d3553 100644 --- a/roguelike.c +++ b/roguelike.c @@ -288,7 +288,7 @@ void save_keybindings(struct World * world) { for (i = 0; i <= keyswindata->max; i++) if (strlen(keybindings[i].name) > linemax) linemax = strlen(keybindings[i].name); - linemax = linemax + 6; // + 6 = + 3 digits + whitespace + newline + null byte + linemax = linemax + 6; // + 6 = + 3 digits + whitespace + newline + null byte char * line = malloc(linemax); for (i = 0; i <= keyswindata->max; i++) { snprintf(line, linemax, "%d %s\n", keybindings[i].key, keybindings[i].name);