Fix a test condition for EOF. Together with previous commit in cut.c (1.4),
this fixes correctly PR #10367.
This commit is contained in:
parent
b88939bbba
commit
7ac97260c6
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: delete.c,v 1.3 2001/03/31 11:37:45 aymeric Exp $ */
|
||||
/* $NetBSD: delete.c,v 1.4 2001/09/09 11:03:02 aymeric Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994
|
||||
|
@ -68,7 +68,7 @@ del(sp, fm, tm, lmode)
|
|||
if (tm->lno == lno) {
|
||||
if (db_get(sp, lno, DBG_FATAL, &p, &len))
|
||||
return (1);
|
||||
eof = tm->cno >= len ? 1 : 0;
|
||||
eof = tm->cno != -1 && tm->cno >= len ? 1 : 0;
|
||||
} else
|
||||
eof = 1;
|
||||
if (eof) {
|
||||
|
|
Loading…
Reference in New Issue