https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3fd6dbd9438324eb999825dfa731a3b0243f87f0

commit 3fd6dbd9438324eb999825dfa731a3b0243f87f0
Author:     Dmitry Borisov <[email protected]>
AuthorDate: Sat May 16 02:09:01 2020 +0600
Commit:     Stanislav Motylkov <[email protected]>
CommitDate: Sat May 16 15:23:00 2020 +0300

    [CPORTLIB] Fix MSVC build for PC-98 target
---
 sdk/lib/cportlib/cport_pc98.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sdk/lib/cportlib/cport_pc98.c b/sdk/lib/cportlib/cport_pc98.c
index 0714fd2bccf..5973e71f9a7 100644
--- a/sdk/lib/cportlib/cport_pc98.c
+++ b/sdk/lib/cportlib/cport_pc98.c
@@ -45,8 +45,8 @@ static BOOLEAN IsNekoProject = FALSE;
 static BOOLEAN
 CpIsNekoProject(VOID)
 {
-    UCHAR Input[3] = "NP2";
-    UCHAR Output[3];
+    UCHAR Input[4] = "NP2";
+    UCHAR Output[4] = {0};
     UCHAR i;
 
     for (i = 0; i < 3; i++)
@@ -55,7 +55,7 @@ CpIsNekoProject(VOID)
     for (i = 0; i < 3; i++)
         Output[i] = READ_PORT_UCHAR((PUCHAR)0x7EF);
 
-    return (memcmp(Input, Output, 3) == 0);
+    return (*(PULONG)Input == *(PULONG)Output);
 }
 
 static VOID

Reply via email to