소스 검색

check unicode value is within range

Johann 5 년 전
부모
커밋
a1814e966f
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      lazpaintcontrols/lcvectortextshapes.pas

+ 2 - 1
lazpaintcontrols/lcvectortextshapes.pas

@@ -964,7 +964,8 @@ procedure TTextShape.InsertUnicodeValue;
 begin
   if FEnteringUnicode then
   begin
-    InsertText(UnicodeCharToUTF8(FUnicodeValue));
+    if FUnicodeValue <= $10FFFF then
+      InsertText(UnicodeCharToUTF8(FUnicodeValue));
     FEnteringUnicode:= false;
   end;
 end;