changeset 18777:ee655cba03ca

merge of '15b4112195b1600fef76bc8602fbcd00c9e3d11d' and '4c9db6b9e8faa21fc798d3706e7603ea655b3b00'
author Luke Schierer <lschiere@pidgin.im>
date Thu, 02 Aug 2007 14:23:24 +0000
parents 88ad571744b4 (diff) adb8092d3267 (current diff)
children 38bac267bf8e
files
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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, "...");
 			}
 		}
--- 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
  */