(svn r22099) [1.1] -Backport from trunk:

- Fix: Remove invalid keycodes when reading hotkeys.cfg [FS#4510] (r22094)
- Fix: The server list did not get sorted with one item in it, so the 'position in the list' variable was never updated causing problems when using the keyboard shortcuts for scrolling [FS#4514] (r22093)
- Fix: When deleting towns, only relocate objects during DC_EXEC (r22087)
This commit is contained in:
rubidium
2011-02-18 20:35:40 +00:00
parent 177135320d
commit fab07a9265
5 changed files with 26 additions and 8 deletions
+6
View File
@@ -95,8 +95,14 @@ static uint16 ParseKeycode(const char *start, const char *end)
uint16 code = ParseCode(start, cur);
if (code == 0) return 0;
if (code & WKC_SPECIAL_KEYS) {
/* Some completely wrong keycode we don't support. */
if (code & ~WKC_SPECIAL_KEYS) return 0;
keycode |= code;
} else {
/* Ignore invalid keycodes */
if (code >= 128) {
return 0;
}
/* Ignore the code if it has more then 1 letter. */
if (keycode & ~WKC_SPECIAL_KEYS) return 0;
keycode |= code;