Mercurial > hg > octave-nkf > gnulib-hg
changeset 1381:24423cbaf6a9
(re_search_2): Don't use ++ inside RE_TRANSLATE.
(re_match_2_internal): Likewise.
author | Richard Stallman <rms@gnu.org> |
---|---|
date | Mon, 25 May 1998 20:14:54 +0000 |
parents | 8254b53ffbac |
children | 894acce816ca |
files | regex.c |
diffstat | 1 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/regex.c +++ b/regex.c @@ -3807,12 +3807,18 @@ else while (range > lim && !fastmap[(unsigned char) - RE_TRANSLATE (translate, (unsigned char) *d++)]) - range--; + RE_TRANSLATE (translate, (unsigned char) *d)]) + { + d++; + range--; + } } else - while (range > lim && !fastmap[(unsigned char) *d++]) - range--; + while (range > lim && !fastmap[(unsigned char) *d]) + { + d++; + range--; + } startpos += irange - range; } @@ -4526,9 +4532,10 @@ do { PREFETCH (); - if ((unsigned char) RE_TRANSLATE (translate, (unsigned char) *d++) + if ((unsigned char) RE_TRANSLATE (translate, (unsigned char) *d) != (unsigned char) *p++) goto fail; + d++; } while (--mcnt); }