mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[KDVM] Fix definition of RtlEqualMemory() (#6988)
Comply with the standard documented behaviour: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlequalmemory#return-value > RtlEqualMemory returns TRUE if Source1 and Source2 are equivalent; otherwise, it returns FALSE. and https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlcomparememory#return-value > [...] If all bytes match up to the specified Length value, the Length value is returned.
This commit is contained in:
parent
0a8b421d53
commit
b84f2a1cdc
2 changed files with 2 additions and 2 deletions
|
@ -121,7 +121,7 @@ KdVmSendReceive(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RtlEqualMemory(ReceiveHeader->Magic, KdVmReplyMagic, 9))
|
if (!RtlEqualMemory(ReceiveHeader->Magic, KdVmReplyMagic, 9))
|
||||||
{
|
{
|
||||||
KDDBGPRINT("KdVmSendReceive: got invalid Magic: '%*s'\n",
|
KDDBGPRINT("KdVmSendReceive: got invalid Magic: '%*s'\n",
|
||||||
sizeof(KdVmReplyMagic), ReceiveHeader->Magic);
|
sizeof(KdVmReplyMagic), ReceiveHeader->Magic);
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <arc/arc.h>
|
#include <arc/arc.h>
|
||||||
|
|
||||||
#undef RtlEqualMemory
|
#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 */
|
//#define KDDEBUG /* uncomment to enable debugging this dll */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue