Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/gen/getcap.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -r1.1 -r1.2 --- src/lib/libc/gen/getcap.c 1993/05/18 07:37:54 1.1 +++ src/lib/libc/gen/getcap.c 1993/06/08 16:49:53 1.2 @@ -674,21 +674,20 @@ cgetnext(bp, db_array) } else continue; } - } else - line[len - 1] = '\0'; - if (len == 1) { + } + if (len == 0) { slash = 0; continue; } if (isspace(*line) || *line == ':' || *line == '#' || slash) { - if (line[len - 2] == '\\') + if (line[len - 1] == '\\') slash = 1; else slash = 0; continue; } - if (line[len - 2] == '\\') + if (line[len - 1] == '\\') slash = 1; else slash = 0; @@ -723,8 +722,7 @@ cgetnext(bp, db_array) (void)cgetclose(); return (-1); } - } else - line[len - 1] = '\0'; + } } } rp = buf;