# HG changeset patch # User Eric Warmenhoven # Date 981188907 0 # Node ID 2f317467d2f9a228f044e9dc9ce136ba2ca8c2d6 # Parent 1ac49082e099a230c311d87e4dbc9588ac3f9097 [gaim-migrate @ 1473] fix < :) > committer: Tailor Script diff -r 1ac49082e099 -r 2f317467d2f9 src/gtkimhtml.c --- a/src/gtkimhtml.c Sat Feb 03 08:19:40 2001 +0000 +++ b/src/gtkimhtml.c Sat Feb 03 08:28:27 2001 +0000 @@ -2479,9 +2479,22 @@ } if (!got_tag) { - ws [wpos] = 0; - strcat (ws, tag); - wpos = strlen (ws); + char *d; + tag [tpos] = 0; + d = tag; + while (*d) { + if ((smilelen = gtk_imhtml_is_smiley (imhtml, d)) != 0) { + ws [wpos] = 0; + wpos = 0; + NEW_BIT (NEW_TEXT_BIT); + g_snprintf (ws, smilelen + 1, "%s", d); + NEW_BIT (NEW_SMILEY_BIT); + d += smilelen; + } else { + ws [wpos++] = *d++; + } + } + tpos = 0; } else { wpos = 0; }