]> git.marmaro.de Git - mmh/blobdiff - uip/replsbr.c
remove trailing newlines from components to fix bug with spaces at the end of
[mmh] / uip / replsbr.c
index 244fdc93246620c086c9561e3426857d03e5f3f6..b8e8e9261e3b249549ceded51ffcff2c64784808 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 {