Author: tkreuzer Date: Thu Mar 19 22:37:43 2015 New Revision: 66825
URL: http://svn.reactos.org/svn/reactos?rev=66825&view=rev Log: [I8042PRT] Fix an off-by-one error in the SMTABLE string parsing code. Enable SYS_VERSION string for VirtualPc detection. Should hopefully fix VirtualPc mouse.
Modified: trunk/reactos/drivers/input/i8042prt/hwhacks.c
Modified: trunk/reactos/drivers/input/i8042prt/hwhacks.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/hwha... ============================================================================== --- trunk/reactos/drivers/input/i8042prt/hwhacks.c [iso-8859-1] (original) +++ trunk/reactos/drivers/input/i8042prt/hwhacks.c [iso-8859-1] Thu Mar 19 22:37:43 2015 @@ -59,7 +59,7 @@ // { {{BOARD_VENDOR, "RIOWORKS"}, {BOARD_NAME, "HDAMB"}, {BOARD_VERSION, "Rev E"}}, FL_NOLOOP }, // { {{BOARD_VENDOR, "ASUSTeK Computer Inc."}, {BOARD_NAME, "G1S"}, {BOARD_VERSION, "1.0"}}, FL_NOLOOP },
- { {{SYS_VENDOR, "Microsoft Corporation"}, {SYS_PRODUCT, "Virtual Machine"}, /*{SYS_VERSION, "VS2005R2"} */}, FL_INITHACK }, + { {{SYS_VENDOR, "Microsoft Corporation"}, {SYS_PRODUCT, "Virtual Machine"}, {SYS_VERSION, "VS2005R2"} }, FL_INITHACK }, { {{SYS_VENDOR, "Dell Inc."}, {SYS_PRODUCT, "Latitude D530"}}, FL_INITHACK }, { {{SYS_VENDOR, "Dell Inc."}, {SYS_PRODUCT, "Latitude D600"}}, FL_INITHACK },
@@ -77,15 +77,19 @@ PCHAR String;
StringIndex = ((PUCHAR)Header)[FieldOffset]; + if (StringIndex == 0) + { + return NULL; + } + String = (PCHAR)Header + Header->Length;
- while (StringIndex != 0) + while (--StringIndex != 0) { while (*String != 0) String++;
String++; - StringIndex--; }
return String;