From: Bill Kendrick Date: Sun, 15 Feb 2004 10:26:15 +0000 (+0000) Subject: Fixed more inappropriate variable declarations. It compiles now! ;^) X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=57655c4e85f0830af6d207fac0217d583949a748;p=supertux.git Fixed more inappropriate variable declarations. It compiles now! ;^) (gcc 2.95.4; debian stable :^P ) SVN-Revision: 123 --- diff --git a/src/menu.c b/src/menu.c index 8431cdb3a..d86a880a6 100644 --- a/src/menu.c +++ b/src/menu.c @@ -417,13 +417,14 @@ int menu_leveleditor(void) /* Menu HighScore (ask for player's name) */ int menu_highscore() { +char str[60]; + while(delete_character > 0) /* remove charactes */ { hs_name[strlen(hs_name)-1] = '\0'; delete_character--; } -char str[60]; strcat(hs_name, input_string); text_drawf(&red_text, "Congratulations", 0, 130, A_HMIDDLE, A_TOP, 2, NO_UPDATE); @@ -488,9 +489,10 @@ void menu_event(SDL_keysym* keysym) { SDLKey key = keysym->sym; SDLMod keymod; -keymod = SDL_GetModState(); char ch[2]; +keymod = SDL_GetModState(); + /* If the current unicode character is an ASCII character, assign it to ch. */ if ( (keysym->unicode & 0xFF80) == 0 ) {