When a node can match varying sizes, the delta variable in the optimizer
needs to change to account for that, and it can no longer match a fixed
length string.
This code was adapted from the existing code for the FOLDCHAR node that
has to deal with the same problem.
if (min < 0) {
min = 0;
}
+ delta += abs(min_change);
if (flags & SCF_DO_SUBSTR) {
data->pos_min += l + min_change;
if (data->pos_min < 0) {
data->pos_min = 0;
}
+ data->pos_delta += abs(min_change);
+ if (min_change) {
+ data->longest = &(data->longest_float);
+ }
}
if (flags & SCF_DO_STCLASS_AND) {
/* Check whether it is compatible with what we know already! */