Selaa lähdekoodia

Rectify last accessed char in TBigEndianUnicideEncoding.GetChars, fixes test/units/sysutils/tencodingtest.pp failure with -gc option

git-svn-id: trunk@34740 -
pierre 8 vuotta sitten
vanhempi
commit
a81d2b58f8
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      rtl/objpas/sysutils/sysencoding.inc

+ 1 - 1
rtl/objpas/sysutils/sysencoding.inc

@@ -659,7 +659,7 @@ begin
   if CharCount < Result then
     Result := CharCount;
   LastChar := @Chars[Result];
-  while Chars <= LastChar do
+  while Chars < LastChar do
   begin
     Chars^ := UnicodeChar(Bytes[1] + Bytes[0] shl 8);
     inc(Bytes, SizeOf(UnicodeChar));