Browse Source

minor cosmetic change in HashLib.

Ugochukwu Mmaduekwe 7 years ago
parent
commit
ff0a378694
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/libraries/hashlib4pascal/HlpHash.pas

+ 6 - 1
src/libraries/hashlib4pascal/HlpHash.pas

@@ -287,13 +287,16 @@ begin
   begin
     if (a_length > -1) then
     begin
-
       if ((a_stream.Position + a_length) > a_stream.Size) then
+      begin
         raise EIndexOutOfRangeHashLibException.CreateRes(@SIndexOutOfRange);
+      end;
     end;
 
     if (a_stream.Position >= a_stream.Size) then
+    begin
       Exit;
+    end;
   end
   else
   begin
@@ -365,7 +368,9 @@ begin
   System.Assert((a_length = -1) or (a_length > 0));
 {$ENDIF DEBUG}
   if not FileExists(a_file_name) then
+  begin
     raise EArgumentHashLibException.CreateRes(@SFileNotExist);
+  end;
 
   MyFileStream := TFileStream.Create(a_file_name, fmOpenRead or
     fmShareDenyWrite);