# HG changeset patch # User Luke Schierer # Date 1186064604 0 # Node ID ee655cba03ca185d447c9d374d855914db31aa49 # Parent 88ad571744b42619b123fdbdf36e48c792f803e6# Parent adb8092d326766431a2a5656010599c1d41d5e59 merge of '15b4112195b1600fef76bc8602fbcd00c9e3d11d' and '4c9db6b9e8faa21fc798d3706e7603ea655b3b00' diff -r adb8092d3267 -r ee655cba03ca libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Thu Aug 02 12:20:59 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Thu Aug 02 14:23:24 2007 +0000 @@ -4523,9 +4523,9 @@ { status_text = purple_markup_strip_html(status_html); /* If the status_text is longer than 60 character then truncate it */ - if (strlen(status_text) > 60) + if (strlen(status_text) > MAXAVAILMSGLEN) { - char *tmp = g_utf8_find_prev_char(status_text, &status_text[58]); + char *tmp = g_utf8_find_prev_char(status_text, &status_text[MAXAVAILMSGLEN - 2]); strcpy(tmp, "..."); } } diff -r adb8092d3267 -r ee655cba03ca libpurple/protocols/oscar/oscar.h --- a/libpurple/protocols/oscar/oscar.h Thu Aug 02 12:20:59 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.h Thu Aug 02 14:23:24 2007 +0000 @@ -114,6 +114,11 @@ */ #define MAXCHATMSGLEN 512 +/* + * Found by trial and error. + */ +#define MAXAVAILMSGLEN 251 + /** * Maximum length for the password of an ICQ account */