diff --git a/rtl/inc/heaptrc.pp b/rtl/inc/heaptrc.pp index e4c50d10ab..a21bad4b03 100644 --- a/rtl/inc/heaptrc.pp +++ b/rtl/inc/heaptrc.pp @@ -815,7 +815,7 @@ begin {$IFDEF OS2} { inside stack ? } if (PtrUInt (P) > PtrUInt (Get_Frame)) and - (PtrUInt (P) < StackTop) then + (PtrUInt (P) < PtrUInt (StackTop)) then goto _exit; { inside data or bss ? } if (PtrUInt (P) >= PtrUInt (@etext)) and (PtrUInt (P) < PtrUInt (@eend)) then