From a806b7c99870f76c5fcf3d34f9d91f37685e1a1c Mon Sep 17 00:00:00 2001 From: Werner Fink Date: Fri, 23 Apr 2021 09:32:09 +0200 Subject: [PATCH] Count every ASCII character Signed-off-by: Werner Fink --- src/encoding.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git src/encoding.c src/encoding.c index 31d4d125..686be210 100644 --- src/encoding.c +++ src/encoding.c @@ -282,8 +282,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \ } \ u = 0; \ for (i = 0; i < __arraycount(dist); i++) { \ - if (dist[i]) \ - u++; \ + u += dist[i]; \ } \ if (u < MIN(nbytes, 3)) \ return 0; \ -- 2.28.0