[Bug 12981] awk: seems to try to falsely expand strings
bugzilla at busybox.net
bugzilla at busybox.net
Mon Jun 8 17:40:47 UTC 2020
https://bugs.busybox.net/show_bug.cgi?id=12981
Bernhard Reutner-Fischer <aldot at uclibc.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P5 |P2
CC| |aldot at uclibc.org
--- Comment #6 from Bernhard Reutner-Fischer <aldot at uclibc.org> ---
(In reply to Steffen Nurpmeso from comment #5)
> > Also, i think that you should put parentheses around the
> > ++unavail in your original code since there is no defined
> > precenence around string concatenation.
> >
> > This is for the snippet
> >
> > ia[1] = "(su__ERR_NUMBER_MAX - " ++unavail ")"
>
> I think he's wrong. The ++unavail would have to be done before
> converting the result to string for the concatentation.
yes, which you can enforce explicitly by adding parenthesis.
I looked a bit into our awk implementation yesterday but i'm not yet sure how
to fix it properly.
We indeed end up calling setvar_i on the lefthand string to set it's number to
0, which clears the string-value of the node. This is of course not what we
want, and is the cause of the "01" output.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list