Index: src/ai/ai_gui.cpp =================================================================== --- src/ai/ai_gui.cpp (revision 20006) +++ src/ai/ai_gui.cpp (working copy) @@ -982,7 +982,7 @@ virtual EventState OnKeyPress(uint16 key, uint16 keycode) { - EventState state; + EventState state = ES_NOT_HANDLED; if (this->HandleEditBoxKey(AID_WIDGET_BREAK_STR_EDIT_BOX, key, keycode, state) != HEBR_NOT_FOCUSED) { /* Save the current string to static member so it can be restored next time the window is opened */ strecpy(this->break_string, this->edit_str_buf, lastof(this->break_string)); Index: src/genworld_gui.cpp =================================================================== --- src/genworld_gui.cpp (revision 20006) +++ src/genworld_gui.cpp (working copy) @@ -688,7 +688,7 @@ virtual EventState OnKeyPress(uint16 key, uint16 keycode) { - EventState state; + EventState state = ES_NOT_HANDLED; this->HandleEditBoxKey(GLAND_RANDOM_EDITBOX, key, keycode, state); /* the seed is unsigned, therefore atoi cannot be used. * As UINT32_MAX is a 'magic' value (use random seed) it Index: src/town_gui.cpp =================================================================== --- src/town_gui.cpp (revision 20006) +++ src/town_gui.cpp (working copy) @@ -1188,7 +1188,7 @@ virtual EventState OnKeyPress(uint16 key, uint16 keycode) { - EventState state; + EventState state = ES_NOT_HANDLED; if (this->HandleEditBoxKey(TSEW_TOWNNAME_EDITBOX, key, keycode, state) == HEBR_CANCEL) { this->UnfocusFocusedWidget(); }