소스 검색

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

git-svn-id: trunk@34740 -
pierre 8 년 전
부모
커밋
a81d2b58f8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      rtl/objpas/sysutils/sysencoding.inc

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

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