- remove ret check to make it more stable

git-svn-id: trunk@38580 -
This commit is contained in:
florian 2018-03-20 21:58:56 +00:00
parent fa3ee68004
commit 6c9d7e5c07

View File

@ -47,7 +47,6 @@ asm
mov eax, fs:[rbp+01] { mov еax, fs:5[locl] }
end;
{ This version works in all i8086 memory models }
function CompareCode(cp, cp2: CodePointer; sz: Integer): Boolean;
var
lastbyte: Byte;
@ -58,12 +57,14 @@ begin
exit;
end;
{ check also that the last byte is a retn instruction }
{ size differs at least between linux and windows, so leave the ret check away
lastbyte:=PByte(cp)[sz-1];
if lastbyte<>$C3 then
begin
CompareCode := False;
exit;
end;
}
CompareCode := True;
end;