mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-21 15:17:40 +00:00
fix(developer): handle high-bit-set HKL correctly
Fixes #7599. MSKLC HKLs have high bit set, which means that we need to explicitly cast from Integer to DWord to avoid range check errors.
This commit is contained in:
parent
cb9649dc4b
commit
d01fe7551d
1 changed files with 3 additions and 3 deletions
|
|
@ -112,7 +112,7 @@ begin
|
|||
if OpenKeyReadOnly('\'+SRegKey_KeyboardLayoutSubstitutes_CU) and
|
||||
ValueExists(IntToHex(HIWORD(ahkl), 8)) then
|
||||
begin
|
||||
Result := StrToIntDef('$'+ReadString(IntToHex(HIWORD(ahkl), 8)), 0);
|
||||
Result := DWord(StrToIntDef('$'+ReadString(IntToHex(HIWORD(ahkl), 8)), 0));
|
||||
Exit;
|
||||
end;
|
||||
finally
|
||||
|
|
@ -146,7 +146,7 @@ begin
|
|||
begin
|
||||
if StrToIntDef('$'+ReadString(SRegValue_KeyboardLayoutID), 0) = LayoutID then
|
||||
begin
|
||||
Result := StrToIntDef('$'+str[i], 0);
|
||||
Result := DWord(StrToIntDef('$'+str[i], 0));
|
||||
if Result = 0 then Result := LOWORD(ahkl);
|
||||
Exit;
|
||||
end;
|
||||
|
|
@ -186,7 +186,7 @@ begin
|
|||
ValueExists(SRegValue_KeyboardLayoutID) then
|
||||
if StrToIntDef('$' + ReadString(SRegValue_KeyboardLayoutID), 0) = LayoutID then
|
||||
begin
|
||||
Result := HIWORD(StrToIntDef('$'+str[i], 0));
|
||||
Result := HIWORD(DWord(StrToIntDef('$'+str[i], 0)));
|
||||
Exit;
|
||||
end;
|
||||
finally
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue