aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
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 f71d71dd..f4104764 100644
--- a/builtin.c
+++ b/builtin.c
@@ -4076,12 +4076,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++;