diff --git a/drivers/base/kdvm/kdvm.c b/drivers/base/kdvm/kdvm.c index f9838878b9c..fa73c5cba7b 100644 --- a/drivers/base/kdvm/kdvm.c +++ b/drivers/base/kdvm/kdvm.c @@ -121,7 +121,7 @@ KdVmSendReceive( return NULL; } - if (RtlEqualMemory(ReceiveHeader->Magic, KdVmReplyMagic, 9)) + if (!RtlEqualMemory(ReceiveHeader->Magic, KdVmReplyMagic, 9)) { KDDBGPRINT("KdVmSendReceive: got invalid Magic: '%*s'\n", sizeof(KdVmReplyMagic), ReceiveHeader->Magic); diff --git a/drivers/base/kdvm/kdvm.h b/drivers/base/kdvm/kdvm.h index 2636577ec6f..14bb21ac696 100644 --- a/drivers/base/kdvm/kdvm.h +++ b/drivers/base/kdvm/kdvm.h @@ -15,7 +15,7 @@ #include #undef RtlEqualMemory -#define RtlEqualMemory(a, b, c) (RtlCompareMemory(a, b, c) != c) +#define RtlEqualMemory(dst, src, len) (RtlCompareMemory((dst), (src), (len)) == (len)) //#define KDDEBUG /* uncomment to enable debugging this dll */