diff options
Diffstat (limited to 'regparse.c')
-rw-r--r-- | regparse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/regparse.c b/regparse.c index 1b2a0830ae..8d74efafea 100644 --- a/regparse.c +++ b/regparse.c @@ -253,12 +253,12 @@ strdup_with_null(OnigEncoding enc, UChar* s, UChar* end) #define PUNFETCH p = pfetch_prev #define PINC do { \ pfetch_prev = p; \ - p += ONIGENC_MBC_ENC_LEN(enc, p, end); \ + p += enclen(enc, p, end); \ } while (0) #define PFETCH(c) do { \ - c = ONIGENC_MBC_TO_CODE(enc, p, end); \ + c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \ pfetch_prev = p; \ - p += ONIGENC_MBC_ENC_LEN(enc, p, end); \ + p += enclen(enc, p, end); \ } while (0) #define PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE) |