diff --git a/reactos/sdk/tools/kbdtool/parser.c b/reactos/sdk/tools/kbdtool/parser.c index 6327dad6432..f3988b027a2 100644 --- a/reactos/sdk/tools/kbdtool/parser.c +++ b/reactos/sdk/tools/kbdtool/parser.c @@ -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];