diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c
index ed73a57b29e645b8aac019cbde8509dbb3ce82f1..6ef822190edfce35aeac7de024321a6ce1f2348b 100644
--- a/clients/tools/ldapmodify.c
+++ b/clients/tools/ldapmodify.c
@@ -1238,7 +1238,7 @@ read_one_record( FILE *fp )
     while ( fgets( line, sizeof(line), fp ) != NULL ) {
     	int len = strlen( line );
 
-		if( len < 2 || ( len == 3 && *line == '\r' )) {
+		if( len < 2 || ( len == 2 && *line == '\r' )) {
 			if( buf == NULL ) {
 				continue;
 			} else {