Browse Source

* fixed range check errors

git-svn-id: trunk@12707 -
Jonas Maebe 16 years ago
parent
commit
31f3d1ead1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/fcl-base/src/ascii85.pp

+ 3 - 3
packages/fcl-base/src/ascii85.pp

@@ -182,11 +182,11 @@ begin
   if aDecodedCount >= 1 then begin
     BufferByte(aValue shr (24 - (0 * 8)));
     if aDecodedCount >= 2 then begin
-      BufferByte(aValue shr (24 - (1 * 8)));
+      BufferByte((aValue shr (24 - (1 * 8))) and $ff);
       if aDecodedCount >= 3 then begin
-        BufferByte(aValue shr (24 - (2 * 8)));
+        BufferByte((aValue shr (24 - (2 * 8))) and $ff);
         if aDecodedCount >= 4 then begin
-          BufferByte(aValue shr (24 - (3 * 8)));
+          BufferByte((aValue shr (24 - (3 * 8))) and $ff);
           if aDecodedCount >= 5 then begin
             raise EConvertError.Create('not enough decoded data (internal error).');
           end;