Blame SOURCES/less-394-search.patch

93dbb7
--- less-394/line.c.search	2005-12-03 21:20:32.000000000 +0100
93dbb7
+++ less-394/line.c	2006-02-15 11:23:25.308694376 +0100
93dbb7
@@ -1125,6 +1125,14 @@
93dbb7
 				break;
93dbb7
 			}
93dbb7
 		}
93dbb7
+		if (c == '\0')
93dbb7
+		{
93dbb7
+			/* 
93dbb7
+			 * Pretend the line ended here
93dbb7
+			 */
93dbb7
+			new_pos = ch_tell();
93dbb7
+			break;
93dbb7
+		}
93dbb7
 		linebuf[n++] = c;
93dbb7
 		c = ch_forw_get();
93dbb7
 	}
93dbb7
@@ -1198,6 +1206,14 @@
93dbb7
 				*to = *fm;
93dbb7
 			n = size_linebuf - old_size_linebuf;
93dbb7
 		}
93dbb7
+		if (c == '\0')
93dbb7
+		{
93dbb7
+			/*
93dbb7
+			 * Pretend the line ended here
93dbb7
+			 */
93dbb7
+			new_pos = ch_tell() + 1;
93dbb7
+			break;
93dbb7
+		}
93dbb7
 		linebuf[--n] = c;
93dbb7
 	}
93dbb7
 	if (linep != NULL)