[ekg2-commit] ekg2: jabber_handlers.c (HEAD) [peres]
CVS commit
cvs w toxygen.net
Czw, 3 Maj 2007, 21:48:01 CEST
Module name: ekg2
Changes by: peres 2007-05-03 21:47:59
Modified files:
jabber_handlers.c
Log message:
Stupid. Thanks, dj.
Index: jabber_handlers.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/jabber_handlers.c,v
diff -d -u -r1.106 -r1.107
--- jabber_handlers.c 3 May 2007 19:30:16 -0000 1.106
+++ jabber_handlers.c 3 May 2007 19:47:58 -0000 1.107
@@ -1018,10 +1018,13 @@
if (hassubject) { /* we need to linearize this earlier */
char *tmp = nsubject->data;
- if (tmp+xstrlen(tmp) == '\n') /* chomp */
- *tmp = '\0';
- while ((tmp = xstrchr(tmp, '\n')))
- *tmp = ' ';
+ while ((tmp = xstrchr(tmp, '\n'))) {
+ if (*(tmp+1) == '\0') {
+ *tmp = '\0';
+ break; /* we really don't need to search again */
+ } else
+ *tmp = ' ';
+ }
}
if ((class == EKG_MSGCLASS_MESSAGE) /* conversations only with messages */
&& (!nonthreaded /* either if we've got thread */
Więcej informacji o liście dyskusyjnej ekg2-commit