aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/base/UFilesystem.pas
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--unicode/src/base/UFilesystem.pas6
1 files changed, 5 insertions, 1 deletions
diff --git a/unicode/src/base/UFilesystem.pas b/unicode/src/base/UFilesystem.pas
index a28b1f39..d4972df5 100644
--- a/unicode/src/base/UFilesystem.pas
+++ b/unicode/src/base/UFilesystem.pas
@@ -665,7 +665,11 @@ function TFileIterator.Next(): TFileInfo;
begin
if (not fHasNext) then
begin
- FillChar(Result, SizeOf(Result), 0);
+ // Note: do not use FillChar() on records with ref-counted fields
+ Result.Time := 0;
+ Result.Size := 0;
+ Result.Attr := 0;
+ Result.Name := nil;
Exit;
end;