ereg_replace before trying to use them.
# i could have sworn i fixed this in php3. ereg() has similar logic, i
# guess i just missed ereg_replace. fixing this lets
# ext/standard/tests/reg/012.phpt pass on my debian/unstable box
if ('\\' == *walk
&& '0' <= walk[1] && '9' >= walk[1]
&& subs[walk[1] - '0'].rm_so > -1
- && subs[walk[1] - '0'].rm_eo > -1) {
+ && subs[walk[1] - '0'].rm_eo > -1
+ /* this next case shouldn't happen. it does. */
+ && subs[walk[1] - '0'].rm_so < subs[walk[1] - '0'].rm_eo) {
tmp = subs[walk[1] - '0'].rm_eo
- subs[walk[1] - '0'].rm_so;
memcpy (walkbuf,
if ('\\' == *walk
&& '0' <= walk[1] && '9' >= walk[1]
&& subs[walk[1] - '0'].rm_so > -1
- && subs[walk[1] - '0'].rm_eo > -1) {
+ && subs[walk[1] - '0'].rm_eo > -1
+ /* this next case shouldn't happen. it does. */
+ && subs[walk[1] - '0'].rm_so < subs[walk[1] - '0'].rm_eo) {
tmp = subs[walk[1] - '0'].rm_eo
- subs[walk[1] - '0'].rm_so;
memcpy (walkbuf,