Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-16075

kbdtool/parser.c: Fix VirtualKey type/value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Untriaged
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:
      None

      Description

      This looks related to CORE-9261, as in part of.

      https://lgtm.com/projects/g/reactos/reactos/alerts/?mode=tree&ruleFocus=2154840804
      reports
      https://git.reactos.org/?p=reactos.git;a=blob;f=sdk/tools/kbdtool/parser.c;hb=e71a94da20f7719193a0ac2203e9fdb0bf6cbef0#l710

       712 DoLAYOUT(IN PLAYOUT LayoutData,
      ...
       806                 /* Check if there is a valid virtual key */
       807                 if (ScVk[i].VirtualKey == 0xFFFF)
      // Comparison is always false because VirtualKey <= 255.
      

      Indeed, that VirtualKey is a UCHAR.
      Copypasta on that line?

      Quick glance, needs double-check:
      may want/need to convert some related ULONG to UCHAR type/value too:

       111 ULONG
       112 getVKNum(IN PCHAR p)
      ...
       722     ULONG VirtualKey;
      ...
       826         VirtualKey = getVKNum(Token);
      ...
       832         if (VirtualKey == 0xFFFF)
      

        Attachments

          Activity

            People

            • Assignee:
              bug zilla Bug Zilla
              Reporter:
              Serge Gautherie Serge Gautherie
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: