summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/subst.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 9df448fc9..1645764ec 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2589,7 +2589,8 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
 	    else if (getlen == 2) {
 		if (*aval)
 		    for (len = -sl, ctr = aval;
-			 len += sl + MB_METASTRLEN(*ctr), *++ctr;);
+			 len += sl + MB_METASTRLEN2(*ctr, multi_width),
+			     *++ctr;);
 	    }
 	    else
 		for (ctr = aval;
@@ -2597,7 +2598,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
 		     len += wordcount(*ctr, spsep, getlen > 3), ctr++);
 	} else {
 	    if (getlen < 3)
-		len = MB_METASTRLEN(val);
+		len = MB_METASTRLEN2(val, multi_width);
 	    else
 		len = wordcount(val, spsep, getlen > 3);
 	}