aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-02-01 21:20:07 +0200
committerArnold D. Robbins <arnold@skeeve.com>2017-02-01 21:20:07 +0200
commitfb06aea485b8da29c8bf9135d641615c50f37ae7 (patch)
tree3c9511bd66120dd4f174e51281d308bdd147d6f5 /builtin.c
parent384261e9ea2b5ad4481b907726c4c92e8711c880 (diff)
parent7b46fc2f6243d91e01b6e74fd69b193b4eddb05b (diff)
downloadegawk-fb06aea485b8da29c8bf9135d641615c50f37ae7.tar.gz
egawk-fb06aea485b8da29c8bf9135d641615c50f37ae7.tar.bz2
egawk-fb06aea485b8da29c8bf9135d641615c50f37ae7.zip
Merge branch 'master' into feature/stringfix
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin.c b/builtin.c
index 14f5c730..a6082ee0 100644
--- a/builtin.c
+++ b/builtin.c
@@ -4100,12 +4100,12 @@ mbc_char_count(const char *ptr, size_t numbytes)
memset(& cur_state, 0, sizeof(cur_state));
- mb_len = mbrlen(ptr, numbytes * gawk_mb_cur_max, &cur_state);
+ mb_len = mbrlen(ptr, numbytes, &cur_state);
if (mb_len <= 0)
return numbytes; /* no valid m.b. char */
for (; numbytes > 0; numbytes--) {
- mb_len = mbrlen(ptr, numbytes * gawk_mb_cur_max, &cur_state);
+ mb_len = mbrlen(ptr, numbytes, &cur_state);
if (mb_len <= 0)
break;
sum++;