X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=gui.c;h=6f688e0be6832c39dbcb5d620b2b6dfac96510c1;hb=ec7552f87eb959b007bd0ed3642e5ccc2faa4d39;hp=1421489013dfd56ef6f60bc427ee2e5ad0ae64da;hpb=8daabd03bb649ae04d6b2dd9e46640ca1e514d3d;p=paraslash.git diff --git a/gui.c b/gui.c index 14214890..6f688e0b 100644 --- a/gui.c +++ b/gui.c @@ -246,8 +246,8 @@ static char *km_keyname(int c) /* Print given number of spaces to curses window. */ static void add_spaces(WINDOW* win, unsigned int num) { - char space[] = " "; - unsigned sz = sizeof(space) - 1; /* number of spaces */ + const char space[] = " "; + const unsigned sz = sizeof(space) - 1; /* number of spaces */ while (num >= sz) { waddstr(win, space); @@ -255,8 +255,7 @@ static void add_spaces(WINDOW* win, unsigned int num) } if (num > 0) { assert(num < sz); - space[num] = '\0'; - waddstr(win, space); + waddstr(win, space + sz - num); } }