ajstarks / openvg

Tools for exploring OpenVG
Other
414 stars 85 forks source link

Segfault error when drawing emoji #65

Closed wasalm closed 6 years ago

wasalm commented 6 years ago

When you use Text() or TextWidth() on text that contain utf-8 characters with codepoint higher than 500, the program will crash, because you are looking outside the bounds of the character map array.

Please add the following lines in the while loop in the functions Text() and TextWidth():

if(character >= MAXFONTPATH-1) { continue; }

This will prevent crashing.

ajstarks commented 6 years ago

fixed with revision https://github.com/ajstarks/openvg/commit/2b32039b3a540bb41f3d88460342700e2e04b5a7