summaryrefslogtreecommitdiff
path: root/UEngines.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2011-08-05 12:00:28 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2011-08-05 12:00:28 +0200
commit734059c6f8954379aeafbde3e65ea593c7a94ff7 (patch)
treea1f959cf613b87843de5f09e4649fb9860df1947 /UEngines.pas
parentfcf1ed7ce1eafa53bf9bf12476abd1c6fde5fc62 (diff)
downloadtuxcmd-734059c6f8954379aeafbde3e65ea593c7a94ff7.tar.xz
Do not use Inc() on Int64 and 32-bit architecture
Apparently another bug in FPC, let's avoid using Inc() for large numbers.
Diffstat (limited to 'UEngines.pas')
-rw-r--r--UEngines.pas6
1 files changed, 3 insertions, 3 deletions
diff --git a/UEngines.pas b/UEngines.pas
index 3db0c25..24eee1a 100644
--- a/UEngines.pas
+++ b/UEngines.pas
@@ -409,9 +409,9 @@ function TLocalTreeEngine.GetDirSize(const APath: string): Int64;
memset(StatBuf, 0, sizeof(Tstat64));
if lstat64(Buf, StatBuf) = 0 then begin
if __S_ISTYPE(StatBuf^.st_mode, __S_IFDIR) then begin
- Inc(Result, InternalGetDirSize(APath + string(Buf)));
+ Result := Result + InternalGetDirSize(APath + string(Buf));
libc_chdir(PChar(APath));
- end else Inc(Result, StatBuf^.st_size);
+ end else Result := Result + StatBuf^.st_size;
end;
libc_free(StatBuf);
end;
@@ -599,7 +599,7 @@ begin
Break; // We cannot ignore write errors
end;
- Inc(BytesDone, BytesRead);
+ BytesDone := BytesDone + BytesRead;
if (@ProgressFunc <> nil) and (not ProgressFunc(Sender, BytesDone, nil)) then
Break;
end;