Re: [PATCH] don't record empty IFS scan regions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Op 22-03-18 om 23:16 schreef Harald van Dijk:
> Passing quoted by value to varvalue() and not attempting to modify it
> should therefore, and in my quick testing does, also work to fix the
> original $@ bug.

Then maybe both that and not recording empty split regions should be done.

My C-fu may not be all that strong but I think my reasoning for my patch
makes straightforward logical sense based on the comment description in
expand.c of what recordregion() does:
/*
 * Record the fact that we have to scan this region of the
 * string for IFS characters.
 */
This is pointless if there is nothing to scan.

Thus, making both changes should fix the bug while implementing a slight
optimisation and increasing code integrity.

(Speaking of code integrity, IMO that mess of gotos is in dire need of
refactoring. But I'm not the person to do that.)

- M.
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux