]> source.dussan.org Git - tigervnc.git/commit
Return the correct number of consumed UTF-8 bytes
authorPierre Ossman <ossman@cendio.se>
Mon, 5 Oct 2020 11:27:52 +0000 (13:27 +0200)
committerPierre Ossman <ossman@cendio.se>
Mon, 5 Oct 2020 11:27:52 +0000 (13:27 +0200)
commite61ff736c150f06cee968ad4530db6bf83de5db3
tree010aa591b261357b46de17ed112fc36790757cd5
parentc6f5f8b0b9505c1e323561b320a334a1ebd540a2
Return the correct number of consumed UTF-8 bytes

This would mess up most conversions from UTF-8 as the caller wouldn't
know how far to step to get to the next valid character, resulting in
markers for invalid data to be injected here and there.

Also add some unit tests to avoid this reoccurring.
common/rfb/util.cxx
tests/unit/CMakeLists.txt
tests/unit/unicode.cxx [new file with mode: 0644]