[KBDTOOL] Handle failure to parse scancodes. Patch by Víctor Martínez Calvo. CID...
authorMark Jansen <mark.jansen@reactos.org>
Sat, 7 May 2016 10:22:45 +0000 (10:22 +0000)
committerMark Jansen <mark.jansen@reactos.org>
Sat, 7 May 2016 10:22:45 +0000 (10:22 +0000)
#comment Thanks!

svn path=/trunk/; revision=71271

reactos/sdk/tools/kbdtool/parser.c

index 6327dad..f3988b0 100644 (file)
@@ -917,6 +917,14 @@ DoLAYOUT(IN PLAYOUT LayoutData,
             exit(1);
         }
     }
+    
+    /* Check if we have found any ScanCode in the file */
+
+    if (ScanCodeCount == -1)
+    {
+        printf("No ScanCode found!\n");
+        exit(1);
+    }
 
     /* Process the scan code table */
     Entry = &LayoutData->Entry[ScanCodeCount];