630Re: clear_next don't work correctly.
- Apr 18 3:26 AM
>I don't see how this can go wrong, unless the mb_off2cells() call givesHmm, I guess that the patch should be included.
>a wrong result. I guess that might happen when it's called with an
>offset that points to the right halve of a double-wide character. At
>least for DBCS characters this does not appear to be checked and an
>invalid result might be returned.
>I think we should attempt to fix the cause of the problem and not work
>around it. mb_off2cells() appears to be used in several places where we
>don't know if we are looking at a single-byte character, the head byte
>or the tail byte of a double-byte character. Can this be fixed?
if leadbyte erase by single-width character,
double-width character will be broken.
Then, the trailbyte and leadbyte of next character might become DBCS.
For example, putting ' ' on ''.
 : clear_next_cell will be TRUE
] : set ptr = " ", but mbyte_cells become 2.
 : thus, set ptr = " " again.
] : repeat ....
: repeat ....
Chat with friends online, try MSN Messenger: http://messenger.msn.com
- << Previous post in topic Next post in topic >>