Explorar o código

check unicode value is within range

Johann %!s(int64=5) %!d(string=hai) anos
pai
achega
a1814e966f
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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;