mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/hardware_test] Fix bug: overwriting wrong memory space
Change-Id: Ie29e657d91ddef78ecf7c0d75f1eac937bb8213f
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "empty_battery_window.h"
|
||||
#include "i18n.h"
|
||||
#include "global_preferences.h"
|
||||
#include "i18n.h"
|
||||
extern "C" {
|
||||
#include <assert.h>
|
||||
}
|
||||
|
||||
@@ -21,13 +21,17 @@ Ion::Keyboard::Key KeyboardView::testedKey() const {
|
||||
}
|
||||
|
||||
void KeyboardView::setDefectiveKey(Ion::Keyboard::Key key) {
|
||||
m_defectiveKey[(int)key] = 1;
|
||||
int keyIndex = (int)key;
|
||||
if (keyIndex < Ion::Keyboard::NumberOfKeys && keyIndex >= 0) {
|
||||
m_defectiveKey[(int)key] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
bool KeyboardView::setNextKey() {
|
||||
m_testedKey = (Ion::Keyboard::Key)((int)m_testedKey+1);
|
||||
int keyIndex = (int)m_testedKey;
|
||||
if (keyIndex >= 54) {
|
||||
if (keyIndex == 55) {
|
||||
resetTestedKey();
|
||||
return false;
|
||||
}
|
||||
if ((keyIndex > 7 && keyIndex < 12) || keyIndex == 35 || keyIndex == 41 || keyIndex == 47 || keyIndex == 53) {
|
||||
|
||||
Reference in New Issue
Block a user