1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-12-24 08:38:54 -05:00

Fix possible crash in spell check

Closes #1048
This commit is contained in:
RichardHitt 2014-07-19 15:51:06 -04:00 committed by TingPing
parent 3ba11f3754
commit d0de16f276

View File

@ -1137,10 +1137,15 @@ entry_strsplit_utf8(GtkEntry *entry, gchar ***set, gint **starts, gint **ends)
gchar *start;
/* Find the end of this string */
cend = i;
while ((!log_attrs[cend].is_word_end || !log_attrs[cend].is_word_boundary)
&& !log_attrs[cend].is_white)
cend++;
for (cend = i; cend < n_attrs; cend++)
{
PangoLogAttr a = log_attrs[cend];
if (a.is_white)
break;
if (a.is_word_end && a.is_word_boundary)
break;
}
/* Copy sub-string */
start = g_utf8_offset_to_pointer(text, i);