Tokeiburu/RagnarokSDE

Incorrect isutf8 position check?

Opened this issue · 0 comments

It looks like a lot of the UTF8 checker code on GitHub is all copied with what appears to be the same issue: if the utf8 multi-byte sequence is at the end of the buffer, it's incorrectly marked as invalid. AFAICT, all of the checks for position >= length -2 (or whatever) should be position > length-2.