From: Christian Heller Date: Mon, 23 Sep 2013 02:07:02 +0000 (+0200) Subject: Corrected line lengths. X-Git-Tag: tce~951 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/blog?a=commitdiff_plain;h=8e38bb5605a46afd6398b69c63c935aa5dc83660;p=plomrogue Corrected line lengths. --- diff --git a/src/main.c b/src/main.c index fcaac80..5d253ce 100644 --- a/src/main.c +++ b/src/main.c @@ -7,10 +7,12 @@ #include /* for time() */ #include /* for getopt(), optarg */ #include /* for uint32_t */ -#include "windows.h" /* for structs WinMeta, Win, init_win_meta(), draw_all_wins() +#include "windows.h" /* for structs WinMeta, Win, init_win_meta(), + * draw_all_wins() */ -#include "readwrite.h" /* for read_uint32_bigendian](), write_uint32_bigendian(), - * try_fopen(), try_fclose(), try_fclose_unlink_rename() +#include "readwrite.h" /* for read_uint32_bigendian](), + * write_uint32_bigendian(), try_fopen(), try_fclose(), + * try_fclose_unlink_rename() */ #include "map_objects.h" /* for structs MapObj Player, init_map_object_defs(), * build_map_objects() diff --git a/src/wincontrol.c b/src/wincontrol.c index 9143181..3d03078 100644 --- a/src/wincontrol.c +++ b/src/wincontrol.c @@ -208,12 +208,12 @@ static void save_win_config(struct World * world, char id) } linemax = linemax + 6; /* + 6 = + 3 digits + whitespace + \n + \0 */ - char keyb_line[linemax]; + char kb_line[linemax]; kb_p = wc->kb.kbs; while (0 != kb_p) { - snprintf(keyb_line, linemax, "%d %s\n", kb_p->key, kb_p->name); - try_fwrite(keyb_line, sizeof(char), strlen(keyb_line), file, world, f_name); + snprintf(kb_line, linemax, "%d %s\n", kb_p->key, kb_p->name); + try_fwrite(kb_line, sizeof(char), strlen(kb_line), file, world, f_name); kb_p = kb_p->next; }