Browse Source

* Fix AV due to not initialized FullName field. Patch by Bart B. Fixes issue #40489

Michaël Van Canneyt 1 year ago
parent
commit
4d1e201975
1 changed files with 4 additions and 1 deletions
  1. 4 1
      packages/fcl-base/src/streamio.pp

+ 4 - 1
packages/fcl-base/src/streamio.pp

@@ -152,8 +152,11 @@ begin
     BufSize:=SizeOf(Buffer);
     BufPtr:=@Buffer;
     Name[0]:=#0;
+    {$ifdef FPC_HAS_FEATURE_UNICODESTRINGS}
+    FullName := nil;
+    {$endif FPC_HAS_FEATURE_UNICODESTRINGS}
     end;
-   SetTextCodePage(F,CP_ACP); 
+   SetTextCodePage(F,CP_ACP);
 end;