Browse Source

* fixed (u)leb reading functions

git-svn-id: branches/debug_eh@40334 -
Jonas Maebe 6 years ago
parent
commit
31898da437
1 changed files with 2 additions and 2 deletions
  1. 2 2
      rtl/inc/psabieh.inc

+ 2 - 2
rtl/inc/psabieh.inc

@@ -161,7 +161,7 @@ function fpc_read_uleb128 (p: PByte; out val: PTRUInt): PByte;
       inc(p);
       inc(p);
       res:=res or (PtrUInt(b and $7f) shl shift);
       res:=res or (PtrUInt(b and $7f) shl shift);
       inc(shift,7);
       inc(shift,7);
-    until (b and $80)<>0;
+    until (b and $80)=0;
 
 
     val:=res;
     val:=res;
     result:=p;
     result:=p;
@@ -181,7 +181,7 @@ function fpc_read_sleb128 (p: PByte; out val: PtrInt): PByte;
       inc(p);
       inc(p);
       res:=res or (PtrUInt(b and $7f) shl shift);
       res:=res or (PtrUInt(b and $7f) shl shift);
       inc(shift,7);
       inc(shift,7);
-    until (b and $80)<>0;
+    until (b and $80)=0;
     if (shift<8*(sizeof(res))) and
     if (shift<8*(sizeof(res))) and
        ((b and $40)<>0) then
        ((b and $40)<>0) then
       res:=res or -(PtrUInt(1) shl shift);
       res:=res or -(PtrUInt(1) shl shift);