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:
aymeric 2001-09-09 11:03:02 +00:00
parent b88939bbba
commit 7ac97260c6
1 changed files with 2 additions and 2 deletions

View File

@ -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) {