From 5994ce5887dde0fcfe6fc449a84635c7ba720287 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sat, 7 May 2016 10:22:45 +0000 Subject: [PATCH] =?UTF-8?q?[KBDTOOL]=20Handle=20failure=20to=20parse=20sca?= =?UTF-8?q?ncodes.=20Patch=20by=20V=C3=ADctor=20Mart=C3=ADnez=20Calvo.=20C?= =?UTF-8?q?ID=201341307=20CORE-11177=20#resolve=20#comment=20Thanks!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=71271 --- reactos/sdk/tools/kbdtool/parser.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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];