changeset 583:9935bcc6fc36

Changed chomp() to also remove CR from CRLF sequences
author mortenp
date Wed, 13 Sep 2006 05:57:45 +1000
parents 5431af5e915b
children 023064697dcf
files ChangeLog src/chomp.c
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Sep 12 04:24:18 2006 +1000
+++ b/ChangeLog	Wed Sep 13 05:57:45 2006 +1000
@@ -1,3 +1,4 @@
+ o Changed chomp() to also remove CR from CRLF sequences
 1.2.12-RC1
  o Update web interface with new tunables
  o Add support for qmail (envelope from address in environment variable)
--- a/src/chomp.c	Tue Sep 12 04:24:18 2006 +1000
+++ b/src/chomp.c	Wed Sep 13 05:57:45 2006 +1000
@@ -38,7 +38,7 @@
 
 	i = strlen(str) - 1;
 
-	while(str[i] == '\n') {
+	while((str[i] == '\n') || (str[i] == '\r')) {
 		str[i] = 0;
 		i--;
 	}