summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-09 18:03:56 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-09 18:03:56 +0300
commitc4132a81d876d6414dee73ca94eb02aeff35ac14 (patch)
tree801862cf07ec3a3babeb0a911794cf38cd0d9431 /src
parent8099bdeb0f4d00f4286159d3004e61976d2a7872 (diff)
downloadmv-c4132a81d876d6414dee73ca94eb02aeff35ac14.tar.gz
mv-c4132a81d876d6414dee73ca94eb02aeff35ac14.tar.bz2
mv-c4132a81d876d6414dee73ca94eb02aeff35ac14.tar.xz
mv-c4132a81d876d6414dee73ca94eb02aeff35ac14.zip
Validate reading keys from config.
Diffstat (limited to 'src')
-rw-r--r--src/keyboardconfig.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp
index cf620148e..50bdaf295 100644
--- a/src/keyboardconfig.cpp
+++ b/src/keyboardconfig.cpp
@@ -397,6 +397,9 @@ void KeyboardConfig::retrieve()
{
mKey[i].value = static_cast<int>(config.getValue(
mKey[i].configField, mKey[i].defaultValue));
+ logger->log("key: %d", mKey[i].value);
+ if (mKey[i].value < -255 || mKey[i].value > SDLK_LAST)
+ mKey[i].value = KEY_NO_VALUE;
}
}
}