Changeset - r15601:4a167136fc6b
[Not reviewed]
master
0 1 0
yexo - 14 years ago 2010-08-01 10:42:18
yexo@openttd.org
(svn r20274) -Fix: special keycodes were matched if a code matched the start of the string (ie 'C' matched 'CTRL')
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/hotkeys.cpp
Show inline comments
 
@@ -70,7 +70,7 @@ static uint16 ParseCode(const char *star
 
	while (start < end && *start == ' ') start++;
 
	while (end > start && *end == ' ') end--;
 
	for (uint i = 0; i < lengthof(_keycode_to_name); i++) {
 
		if (strncasecmp(start, _keycode_to_name[i].name, end - start) == 0) {
 
		if (strlen(_keycode_to_name[i].name) == end - start && strncasecmp(start, _keycode_to_name[i].name, end - start) == 0) {
 
			return _keycode_to_name[i].keycode;
 
		}
 
	}
0 comments (0 inline, 0 general)