mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
- Do not look outside VkToWcharTable[].
- Check for WCH_NONE. svn path=/trunk/; revision=26940
This commit is contained in:
parent
90342114af
commit
eb8e07f1a2
1 changed files with 6 additions and 6 deletions
|
@ -248,6 +248,7 @@ static BOOL TryToTranslateChar(WORD wVirtKey,
|
|||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (nMod = 0; keyLayout->pVkToWcharTable[nMod].nModifications; nMod++)
|
||||
{
|
||||
vtwTbl = &keyLayout->pVkToWcharTable[nMod];
|
||||
|
@ -263,13 +264,12 @@ static BOOL TryToTranslateChar(WORD wVirtKey,
|
|||
|
||||
if( CapsMod >= keyLayout->pVkToWcharTable[nMod].nModifications )
|
||||
{
|
||||
DWORD MaxBit = 1;
|
||||
while( MaxBit <
|
||||
keyLayout->pVkToWcharTable[nMod].nModifications )
|
||||
MaxBit <<= 1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CapsMod &= MaxBit - 1; /* Guarantee that CapsMod lies
|
||||
in bounds. */
|
||||
if( vkPtr->wch[CapsMod] == WCH_NONE )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*pbDead = vkPtr->wch[CapsMod] == WCH_DEAD;
|
||||
|
|
Loading…
Reference in a new issue