From 3c78f14d5cfe98cb567cced9cfe283cb890155ef Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Sun, 23 Apr 2017 23:58:44 +0900 Subject: 40994: unmeta_one() need not count Meta --- Src/utils.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'Src/utils.c') diff --git a/Src/utils.c b/Src/utils.c index 9701ea78a..ea4b34bab 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -4797,7 +4797,6 @@ unmeta_one(const char *in, int *sz) convchar_t wc; int newsz; #ifdef MULTIBYTE_SUPPORT - int ulen; mbstate_t wstate; #endif @@ -4810,13 +4809,7 @@ unmeta_one(const char *in, int *sz) #ifdef MULTIBYTE_SUPPORT memset(&wstate, 0, sizeof(wstate)); - ulen = mb_metacharlenconv_r(in, &wc, &wstate); - while (ulen-- > 0) { - if (in[*sz] == Meta) - *sz += 2; - else - *sz += 1; - } + *sz = mb_metacharlenconv_r(in, &wc, &wstate); #else if (in[0] == Meta) { *sz = 2; -- cgit 1.4.1