0.9.7claws9
[claws.git] / src / procheader.c
index 4d1b228302e89d542cfe4d281c4bee0d9dc8bdf3..4d543b60dd4437ddfc46dbfd51266c79cd369140 100644 (file)
@@ -121,6 +121,9 @@ static gint generic_get_one_field(gchar *buf, gint len, void *data,
                if (buf[0] == '\r' || buf[0] == '\n') return -1;
        }
 
+       /* remove trailing new line */
+       strretchomp(buf);
+
        /* unfold line */
        while (1) {
                nexthead = peekchar(data);
@@ -140,9 +143,6 @@ static gint generic_get_one_field(gchar *buf, gint len, void *data,
                        break;
        }
 
-       /* remove trailing new line */
-       strretchomp(buf);
-
        return hnum;
 }