Browse Source

check unicode value is within range

Johann 5 năm trước cách đây
mục cha
commit
a1814e966f
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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;