Mercurial > pidgin
comparison finch/libgnt/gntentry.c @ 23294:47492dabcb4a
Fixes a crash when next_begin_word is called on trailing spaces at the
end of an entry.
applied changes from 0b25c9dd3deaa5c16f7deff33c36af4812f2629a
through abef8860abbb7cbebfd89a34d86d43457c0b5caf
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 06 Jun 2008 03:04:05 +0000 |
parents | f3087936d594 |
children | f658f9a84fe9 |
comparison
equal
deleted
inserted
replaced
23293:5e6392e93ce9 | 23294:47492dabcb4a |
---|---|
578 gunichar ch = 0; | 578 gunichar ch = 0; |
579 | 579 |
580 while (text && text < end && g_unichar_isspace(g_utf8_get_char(text))) | 580 while (text && text < end && g_unichar_isspace(g_utf8_get_char(text))) |
581 text = g_utf8_find_next_char(text, end); | 581 text = g_utf8_find_next_char(text, end); |
582 | 582 |
583 ch = g_utf8_get_char(text); | 583 if (text) { |
584 while ((text = g_utf8_find_next_char(text, end)) != NULL && text <= end) { | 584 ch = g_utf8_get_char(text); |
585 gunichar cur = g_utf8_get_char(text); | 585 while ((text = g_utf8_find_next_char(text, end)) != NULL && text <= end) { |
586 if (!SAME(ch, cur)) | 586 gunichar cur = g_utf8_get_char(text); |
587 break; | 587 if (!SAME(ch, cur)) |
588 break; | |
589 } | |
588 } | 590 } |
589 return (text ? text : end); | 591 return (text ? text : end); |
590 } | 592 } |
591 | 593 |
592 #undef SAME | 594 #undef SAME |