ireset mbtowc decoding state so it prints the warning once - gopher-validator - Simple gopher menu validator. Err bitreich.org 70 hgit clone git://bitreich.org/gopher-validator git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-validator URL:git://bitreich.org/gopher-validator git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-validator bitreich.org 70 1Log /scm/gopher-validator/log.gph bitreich.org 70 1Files /scm/gopher-validator/files.gph bitreich.org 70 1Refs /scm/gopher-validator/refs.gph bitreich.org 70 1Tags /scm/gopher-validator/tag bitreich.org 70 1README /scm/gopher-validator/file/README.gph bitreich.org 70 1LICENSE /scm/gopher-validator/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit d9abe6e45e708f965778fba7a66e56300fc0b814 /scm/gopher-validator/commit/d9abe6e45e708f965778fba7a66e56300fc0b814.gph bitreich.org 70 1parent 936d0f6a5c92d6580cd15d60fac5c0e98b01e946 /scm/gopher-validator/commit/936d0f6a5c92d6580cd15d60fac5c0e98b01e946.gph bitreich.org 70 hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org bitreich.org 70 iDate: Tue, 5 Jan 2021 21:50:49 +0100 Err bitreich.org 70 i Err bitreich.org 70 ireset mbtowc decoding state so it prints the warning once Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M gopher-validator.c | 1 + Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 1 insertion(+), 0 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/gopher-validator.c b/gopher-validator.c /scm/gopher-validator/file/gopher-validator.c.gph bitreich.org 70 i@@ -386,6 +386,7 @@ checkdir(FILE *fp) Err bitreich.org 70 i if (r == 0) Err bitreich.org 70 i break; Err bitreich.org 70 i if (r == -1) { Err bitreich.org 70 i+ mbtowc(NULL, NULL, 0); /* reset state */ Err bitreich.org 70 i warning("%zu:%d: username: first invalid byte, not UTF-8\n", Err bitreich.org 70 i linenr, i + 1); Err bitreich.org 70 i break; Err bitreich.org 70 .