mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 20:34:12 +00:00
![Eugene Sandulenko](/assets/img/avatar_default.png)
If there are unicode characters in the link, it was leading to wrong length calculation. Example of such link: ![Menü-Symbol](menu.png \"Menü-Symbol\"){w=10em} The problem is that for simplicity, we are working with UTF8 in Markdown, but still with U32String in MacTextCanvas. This led to the string length be calculated for UTF8, which is a multibyte encoding. As a result, we were overshooting the link parsing and reading texts as numbers. This is kind of a hacky solution: we convert text to U32 before caluclating the string length