From 4b6a9ca61da11834047572083fc988ae13420a6a Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Thu, 16 Sep 1993 20:45:46 +0000 Subject: [PATCH] off by one in nbytes --- src/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/file.c b/src/file.c index 7de0ea57..3a013a2f 100644 --- a/src/file.c +++ b/src/file.c @@ -26,7 +26,7 @@ */ #ifndef lint static char *moduleid = - "@(#)$Id: file.c,v 1.26 1993/02/19 14:22:45 ian Exp $"; + "@(#)$Id: file.c,v 1.27 1993/09/16 20:45:46 christos Exp $"; #endif /* lint */ #include @@ -234,7 +234,7 @@ int wid; if (nbytes == 0) ckfputs("empty", stdout); else { - buf[nbytes] = '\0'; /* null-terminate it */ + buf[nbytes++] = '\0'; /* null-terminate it */ tryit(buf, nbytes); } -- 2.40.0