regexec(): fix ganch and till settings
authorDavid Mitchell <davem@iabyn.com>
Sat, 13 Jul 2013 20:18:50 +0000 (21:18 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sun, 28 Jul 2013 09:33:38 +0000 (10:33 +0100)
commitfe3974be45584ef82847c18e12a8eed80feb77e1
tree466f18f6c9a3ce9e5708dbf9e722f89dc63e9449
parentdfa77d06f76732ca30c8606edc55c6fc01c9dbc7
regexec(): fix ganch and till settings

Since startpos is now the \G-adjusted start position, use the real start
position instead (stringarg) when setting reginfo->till, and when setting
ganch in the non-pos case.

This stops this infinitely looping:

    $_ = "x"; pos = 1; @a = /x\G/g
regexec.c
t/re/pat.t