added some checks, this shouldn't be needed with a consistent keymap, but as we don't want to crash in this case ... (could help DarkWyrm)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13692 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -228,6 +228,8 @@ Keymap::IsDeadSecondKey(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey)
|
|||||||
default: offset = fKeys.normal_map[keyCode]; break;
|
default: offset = fKeys.normal_map[keyCode]; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (offset <= 0)
|
||||||
|
return false;
|
||||||
uint32 numBytes = fChars[offset];
|
uint32 numBytes = fChars[offset];
|
||||||
|
|
||||||
if (!numBytes)
|
if (!numBytes)
|
||||||
@@ -299,6 +301,8 @@ Keymap::GetChars(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey, char** c
|
|||||||
default: offset = fKeys.normal_map[keyCode]; break;
|
default: offset = fKeys.normal_map[keyCode]; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (offset <= 0)
|
||||||
|
return;
|
||||||
// here we get the char size
|
// here we get the char size
|
||||||
*numBytes = fChars[offset];
|
*numBytes = fChars[offset];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user