From 0e53126e686548f72041ed50d0f63a4052b92422 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 25 Sep 2001 19:45:23 +0000 Subject: [PATCH] Additional CR/LF fixes --- libraries/libldif/line64.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libraries/libldif/line64.c b/libraries/libldif/line64.c index f0db46a0f7..a3eabb88c3 100644 --- a/libraries/libldif/line64.c +++ b/libraries/libldif/line64.c @@ -274,15 +274,20 @@ ldif_getline( char **next ) line = *next; while ( (*next = strchr( *next, '\n' )) != NULL ) { - unsigned char c = (*next)[1]; - #if CONTINUED_LINE_MARKER != '\r' if ( (*next)[-1] == '\r' ) { (*next)[-1] = CONTINUED_LINE_MARKER; } #endif - if ( !isspace( c ) || c == '\n' ) { + if ( (*next)[1] == '\r' ) { + if( (*next)[2] == '\n' ) { + *(*next)++ = '\0'; + } + *(*next)++ = '\0'; + break; + + } else if ( (*next)[1] != ' ' ) { *(*next)++ = '\0'; break; } -- 2.39.5