-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
This patch:
 - fixes a segfault which happened for me when a MSN user with a really long 
id was added to my list.
 - removes newlines that was added to every message sent as a result of 
hitting enter before the '.'

Phil
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBXkTTxIxNqC2kQ1MRAjFhAJ9n4zJj5XRMbsqg7evgsIRCa7m3rQCfWjXq
Ni/ojTBFyTIeCcbhStqUaTs=
=q1v8
-----END PGP SIGNATURE-----
? console.diff
Index: console.cpp
===================================================================
RCS file: /cvsroot/licq/console/src/console.cpp,v
retrieving revision 1.90
diff -u -r1.90 console.cpp
--- console.cpp	30 Sep 2004 01:51:03 -0000	1.90
+++ console.cpp	2 Oct 2004 05:57:44 -0000
@@ -1903,8 +1903,9 @@
                          m_cColorInfo->nAttr);
         return;
       }
+      sz--;
       *sz = '\0';
-      sz++;
+      sz += 2;
       bool bDirect = SendDirect(data->szId, data->nPPID, *sz);
       winMain->wprintf("%C%ASending message %s...", m_cColorInfo->nColor,
                        m_cColorInfo->nAttr,
Index: console.h
===================================================================
RCS file: /cvsroot/licq/console/src/console.h,v
retrieving revision 1.39
diff -u -r1.39 console.h
--- console.h	30 Sep 2004 01:51:03 -0000	1.39
+++ console.h	2 Oct 2004 05:57:45 -0000
@@ -28,8 +28,8 @@
 
 struct SUser
 {
-  char szKey[32];
-  char szId[32];
+  char szKey[256];
+  char szId[256];
   unsigned long nPPID;
   char *szLine;
   bool bOffline;
@@ -43,7 +43,7 @@
 {
   int pos;
   unsigned long nPPID;
-  char szId[32];
+  char szId[256];
   const struct SColorMap *color;
 };
 
Index: console_print.cpp
===================================================================
RCS file: /cvsroot/licq/console/src/console_print.cpp,v
retrieving revision 1.43
diff -u -r1.43 console_print.cpp
--- console_print.cpp	30 Sep 2004 01:51:03 -0000	1.43
+++ console_print.cpp	2 Oct 2004 05:57:48 -0000
@@ -372,7 +372,7 @@
 void CLicqConsole::PrintUsers()
 {
   char *title = "<C></B/40>Contacts";
-  char *ulist[10000];
+  char *ulist[1024];
   int i = 0;
   struct SScrollUser *s = NULL;
   

Reply via email to