From: K.Kosako Date: Mon, 7 Jan 2019 08:56:21 +0000 (+0900) Subject: refactoring X-Git-Tag: v6.9.2_rc1~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6539150f5863729dfdcc68ce2c2bf9f18c84c1c;p=onig refactoring --- diff --git a/src/regparse.c b/src/regparse.c index 1378eea..9b03ebd 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -7881,12 +7881,12 @@ parse_exp(Node** np, OnigToken* tok, int term, UChar** src, UChar* end, case TK_CODE_POINT: { UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; - int num = ONIGENC_CODE_TO_MBC(env->enc, tok->u.code, buf); - if (num < 0) return num; + len = ONIGENC_CODE_TO_MBC(env->enc, tok->u.code, buf); + if (len < 0) return len; #ifdef NUMBERED_CHAR_IS_NOT_CASE_AMBIG - *np = node_new_str_raw(buf, buf + num); + *np = node_new_str_raw(buf, buf + len); #else - *np = node_new_str(buf, buf + num); + *np = node_new_str(buf, buf + len); #endif CHECK_NULL_RETURN_MEMERR(*np); }