UTF-8 problem in VteAccess
@behdad
Submitted by Behdad Esfahbod Assigned to Chris Wilson
Link to original bug (#399137)
Description
[First noted in bug 397724]
While looking around vteaccess.c, this seems wrong to me:
/* Back up from both end points until we find the *last* point
* where they differed. */
while ((olen > offset) && (clen > offset)) {
if (old[olen - 1] != current[clen - 1]) {
break;
}
olen--;
clen--;
}
One should not do that on UTF-8 strings. Instead g_utf8_prev_char() and g_utf8_get_char() should be used.
Resolution: RESOLVED FIXED