From 3d5c5b3128308dc348701fe128c4ea36eeda8490 Mon Sep 17 00:00:00 2001 From: enami Date: Sat, 23 Mar 2002 21:32:21 +0000 Subject: [PATCH] Actually skip the first byte of invalid byte sequence. --- usr.bin/wc/wc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c index 2eb698fe8f69..2af76e952d6a 100644 --- a/usr.bin/wc/wc.c +++ b/usr.bin/wc/wc.c @@ -1,4 +1,4 @@ -/* $NetBSD: wc.c,v 1.25 2002/03/23 21:29:38 enami Exp $ */ +/* $NetBSD: wc.c,v 1.26 2002/03/23 21:32:21 enami Exp $ */ /* * Copyright (c) 1980, 1987, 1991, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1987, 1991, 1993\n\ #if 0 static char sccsid[] = "@(#)wc.c 8.2 (Berkeley) 5/2/95"; #else -__RCSID("$NetBSD: wc.c,v 1.25 2002/03/23 21:29:38 enami Exp $"); +__RCSID("$NetBSD: wc.c,v 1.26 2002/03/23 21:32:21 enami Exp $"); #endif #endif /* not lint */ @@ -160,6 +160,7 @@ do_mb(wc, p, mblen, st, cnt, file) mblen--; p++; memset(st, 0, sizeof(*st)); + continue; } else if (r == (size_t)-2) break; else if (r == 0)