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