summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mbstring/mbfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/mbfilter.c b/ext/mbstring/mbfilter.c
index e5c896a087..00321673b9 100644
--- a/ext/mbstring/mbfilter.c
+++ b/ext/mbstring/mbfilter.c
@@ -7061,10 +7061,10 @@ mbfl_strimwidth(
n = string->len;
if (p != NULL) {
while (n > 0) {
+ n--;
if ((*encoder->filter_function)(*p++, encoder) < 0) {
break;
}
- n--;
}
mbfl_convert_filter_flush(encoder);
if (pc.status != 0 && mkwidth > 0) {