1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Don't overcount in utf8_step_forward

Reported by witekfl.
This commit is contained in:
Kalle Olavi Niemitalo 2009-05-27 00:50:57 +03:00 committed by Kalle Olavi Niemitalo
parent 68ccb4513d
commit 6d7b904fe3

View File

@ -456,7 +456,7 @@ utf8_step_forward(unsigned char *string, unsigned char *end,
case UTF8_STEP_CELLS_FEWER:
case UTF8_STEP_CELLS_MORE:
while (steps < max) {
while (steps < max && current < end) {
unicode_val_T u;
unsigned char *prev = current;
int width;