Browse Source

* Removed null-termination in TXMLStreamInputSource.FetchData(): it isn't necessary and is causing unaligned access errors with ARM CPUs.

git-svn-id: trunk@14360 -
sergei 16 năm trước cách đây
mục cha
commit
a7d1856620
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      packages/fcl-xml/src/xmlread.pp

+ 5 - 1
packages/fcl-xml/src/xmlread.pp

@@ -1131,7 +1131,11 @@ begin
   if BytesRead < FCapacity then
     FEof := True;
   FCharBufEnd := FAllocated + (Slack-4) + BytesRead;
-  PWideChar(FCharBufEnd)^ := #0;
+  { Null-termination has been removed:
+    1) Built-in decoders don't need it because they respect the buffer length.
+    2) It was causing unaligned access errors on ARM CPUs.
+  }
+  //PWideChar(FCharBufEnd)^ := #0;
 end;
 
 { TXMLFileInputSource }