remove trailing newlines from components to fix bug with spaces at the end of
authorOliver Kiddle <okiddle@yahoo.co.uk>
Sun, 29 Jan 2006 19:34:42 +0000 (19:34 +0000)
committerOliver Kiddle <okiddle@yahoo.co.uk>
Sun, 29 Jan 2006 19:34:42 +0000 (19:34 +0000)
Subject/References in replies

ChangeLog
uip/replsbr.c

index 7f5be11..33be307 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-29  Oliver Kiddle  <okiddle@yahoo.co.uk>
+
+       * bug 4360: uip/replsbr.c: remove trailing newlines from components
+       to fix bug with spaces at the end of Subject/References in replies
+
 2006-01-18  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
        * configure.in: use AS_HELP_STRING for formatting help messages
index 244fdc9..b8e8e92 100644 (file)
@@ -162,7 +162,9 @@ replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen,
                        if (!strcasecmp(name, cptr->c_name)) {
                            char_read += msg_count;
                            if (! cptr->c_text) {
-                               cptr->c_text = tmpbuf;
+                               i = strlen(cptr->c_text = tmpbuf) - 1;
+                               if (tmpbuf[i] == '\n')
+                                   tmpbuf[i] = '\0';
                                *--savecomp = cptr;
                                tmpbuf = *nxtbuf++;
                            } else {