7.03 - if conditions and ! next to % or $ - 27/05/10 05:49 AM
this might have been posted before since it is quite a noticeable bug, but damned if i know how to search for it :p
if (v1 op v2) will have v1 and/or v2 interpreted and negated as code if either start with ! and are followed by a % or $
- $true
-
* /if: invalid format
and so on. i can only assume this is a side effect of having if (!v1) support, but perhaps a modification could be made to not perform any negation if there exists a conditional operator?
if (v1 op v2) will have v1 and/or v2 interpreted and negated as code if either start with ! and are followed by a % or $
Code:
//if (abc == !$()) { } | echo -a - $v2
- $true
Code:
//if (!$(abc) isin xyz) { } | echo -a - $v1
-
Code:
//if (!$() != !$+) { } | echo -a $v1 - $v2
* /if: invalid format
and so on. i can only assume this is a side effect of having if (!v1) support, but perhaps a modification could be made to not perform any negation if there exists a conditional operator?