It's peculiar circumstances indeed that would get to this point in the
code with an EXACT node to be created, but nothing to populate it with.
Perhaps it is impossible; I'm not sure. But commit
5f820f894e71b6970a5aa0fd763a84b647fd628a changed the behavior, which I
discovered in later re-reading the code. Probably the node would be
populated with a single NUL. Just in case it is possible to get here
under these peculiar circumstances, this commit adds code to handle the
case, with a NOTHING node instead of a 0 length EXACT.
loopdone: /* Jumped to when encounters something that shouldn't be in
the node */
+ /* I (khw) don't know if you can get here with zero length, but the
+ * old code handled this situation by creating a zero-length EXACT
+ * node. Might as well be NOTHING instead */
+ if (len == 0) {
+ OP(ret) = NOTHING;
+ }
+ else{
alloc_maybe_populate_EXACT(pRExC_state, ret, flagp, len, ender);
+ }
RExC_parse = p - 1;
Set_Node_Cur_Length(ret); /* MJD */