diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-12-12 10:16:42 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-12-12 10:16:42 +0200 |
commit | 732ff4b46b76601ef63162fa06cff6d0a2028a62 (patch) | |
tree | 247dbbe934725f40680c44c47087589a8d1adcb3 /dfa.c | |
parent | c5da922b0486462028584e4568d6e00d1a4f2783 (diff) | |
download | egawk-732ff4b46b76601ef63162fa06cff6d0a2028a62.tar.gz egawk-732ff4b46b76601ef63162fa06cff6d0a2028a62.tar.bz2 egawk-732ff4b46b76601ef63162fa06cff6d0a2028a62.zip |
Further the cause of RRI in dfa.c.
Diffstat (limited to 'dfa.c')
-rw-r--r-- | dfa.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -2887,7 +2887,6 @@ match_mb_charset (struct dfa *d, int s, position pos, int idx) with which this operator match. */ int op_len; /* Length of the operator. */ char buffer[128]; - wchar_t wcbuf[6]; /* Pointer to the structure to which we are currently refering. */ struct mb_char_classes *work_mbc; @@ -2964,17 +2963,11 @@ match_mb_charset (struct dfa *d, int s, position pos, int idx) } } - wcbuf[0] = wc; - wcbuf[1] = wcbuf[3] = wcbuf[5] = '\0'; - /* match with a range? */ for (i = 0; i<work_mbc->nranges; i++) { - wcbuf[2] = work_mbc->range_sts[i]; - wcbuf[4] = work_mbc->range_ends[i]; - - if (wcscoll(wcbuf, wcbuf+2) >= 0 && - wcscoll(wcbuf+4, wcbuf) >= 0) + if (work_mbc->range_sts[i] <= wc && + wc <= work_mbc->range_ends[i]) goto charset_matched; } |