Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37752617
en ru br
Репозитории ALT
S:633-alt1
5.1: 436-alt2
4.1: 418-alt1
4.0: 394-alt1
3.0: 382-alt2
www.altlinux.org/Changes

Группа :: Работа с файлами
Пакет: less

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: less-394-rh-search.patch
Скачать


--- less-394/line.c.search	2005-12-03 21:20:32.000000000 +0100
+++ less-394/line.c	2006-02-15 11:23:25.308694376 +0100
@@ -1161,6 +1161,14 @@
 				break;
 			}
 		}
+		if (c == '\0')
+		{
+			/* 
+			 * Pretend the line ended here
+			 */
+			new_pos = ch_tell();
+			break;
+		}
 		linebuf[n++] = c;
 		c = ch_forw_get();
 	}
@@ -1237,6 +1245,14 @@
 				*to = *fm;
 			n = size_linebuf - old_size_linebuf;
 		}
+		if (c == '\0')
+		{
+			/*
+			 * Pretend the line ended here
+			 */
+			new_pos = ch_tell() + 1;
+			break;
+		}
 		linebuf[--n] = c;
 	}
 	if (linep != NULL)
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin