home · contact · privacy
Fixed off-by-one error encountered while changing default key for 'reload_wins' command.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 31 Aug 2013 03:34:46 +0000 (05:34 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 31 Aug 2013 03:34:46 +0000 (05:34 +0200)
README
config/keybindings
src/keybindings.c

diff --git a/README b/README
index 6ad1207c55ae067a81189d3a642eb902155e0ad1..f21799ce785acad3d96c91679a7de3bd5014ef36 100644 (file)
--- a/README
+++ b/README
@@ -45,7 +45,7 @@ Y       shift window backwards
 _       shrink window horizontally
 +       grow window vertically
 -       shrink window vertically
-Z       reload window configuration
+r       reload window configuration
 
 w       scroll map up
 x       scroll map down
index 009a8b74e7cc0360ca2a2044adca51e580e33823..257ff5e63495391f3de9fb2f502c8fc7f60c3a3f 100644 (file)
@@ -17,6 +17,7 @@
 95 shri_h
 43 grow_v
 45 shri_v
+114 reload_wins
 119 map_u
 120 map_d
 97 map_l
@@ -27,4 +28,3 @@
 65 player_l
 68 player_r
 83 wait
-90 reload_wins
index 3ce0e440b2d319af9ff0b81d1040bc468518c10f..121304bdadd9ed2d773adf6eed374f4c8a034bd4 100644 (file)
@@ -24,7 +24,7 @@ extern void init_keybindings(struct World * world)
     char * command = malloc(linemax);
     uint16_t commcount = 0;
     char * cmdptr;
-    while (fgets(command, linemax, file))
+    while (fgets(command, linemax + 1, file))
     {
         keybindings[commcount].key = atoi(command);
         cmdptr = strchr(command, ' ') + 1;