Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix scrolling of UTF-8 text. #384
I'm not that experienced with C++, but I found some bugs in your PR that might cause out-of-bounds array access if the text contains invalid UTF-8 byte sequences.
There is a patch available on the old SourceForge issue tracker (https://sourceforge.net/p/conky/bugs/341/#73c2) that solves exactly this bug and it looks cleaner that this PR, maybe that should be adapted instead.
Differences from that patch were described in my PR fixing the same bug for older version of conky (#292). This P/R includes also fixes for new features (additional scroll modes) and does not contain bugs of aidecoe's patch (unstable length of scroll field, interpretation of characters as UTF-8 in non-UTF-8 mode).