|
From: | Todd Lewis |
Subject: | Re: regex backward search broken |
Date: | Fri, 5 Aug 2016 20:16:31 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 08/05/2016 06:03 PM, Paul Eggert wrote:
Indeed, the code in current "master" does work as advertised. I thought we were using current (well, we were, then). Sorry for the noise, and thanks for the clue. -- ToddOn 08/05/2016 12:29 PM, Todd Lewis wrote:The diff below works around the problem, at least for re_search(), which is the only regex function I'm using. The problem seems to be mixingsigned math -- 'range' is negative for backward searches -- with unsigned "Idx"-typed variables 'length' and 'start'. "Idx" is an unsigned type when_REGEX_LARGE_OFFSETS is defined.Thanks, but Idx is now always a signed type, as of Gnulib commit f97745b0f632a9ddae3e48cec083dd71099d37c2 dated 2016-02-19. I guess you're using an older version of Gnulib. Does the current Gnulib version fix your bug in a different way?
[Prev in Thread] | Current Thread | [Next in Thread] |