https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4db8b82aeb1c1f9a968e1…
commit 4db8b82aeb1c1f9a968e13dc0e20b5349e937741
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Jun 6 21:26:34 2021 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Jun 6 21:27:00 2021 +0200
[VIDEOPRT] Fix monitor ID decoding issues
---
win32ss/drivers/videoprt/child.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/win32ss/drivers/videoprt/child.c b/win32ss/drivers/videoprt/child.c
index 2c280850a8b..2d74070ff88 100644
--- a/win32ss/drivers/videoprt/child.c
+++ b/win32ss/drivers/videoprt/child.c
@@ -40,10 +40,12 @@ IntVideoPortGetMonitorId(
/* 3 letters 5-bit ANSI manufacturer code (big endian) */
/* Letters encoded as A=1 to Z=26 */
- Manufacturer = *(PUSHORT)(&ChildExtension->ChildDescriptor[8]);
+ Manufacturer = ((USHORT)ChildExtension->ChildDescriptor[8] << 8) +
+ (USHORT)ChildExtension->ChildDescriptor[9];
/* Model number (16-bit little endian) */
- Model = *(PUSHORT)(&ChildExtension->ChildDescriptor[10]);
+ Model = ((USHORT)ChildExtension->ChildDescriptor[11] << 8) +
+ (USHORT)ChildExtension->ChildDescriptor[10];
/* Convert the Monitor ID to a readable form */
swprintf(Buffer,