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 15 years ago
parent
commit
a7d1856620
1 changed files with 5 additions and 1 deletions
  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 }