Explorar o código

* 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 %!s(int64=16) %!d(string=hai) anos
pai
achega
a7d1856620
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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 }