commit | 44f65c0e2f5ce27ce90bbec218ecb39cba9d75a2 | [log] [tgz] |
---|---|---|
author | Damien George <damien.p.george@gmail.com> | Wed Mar 25 23:06:48 2015 +0000 |
committer | Damien George <damien.p.george@gmail.com> | Wed Mar 25 23:06:48 2015 +0000 |
tree | 5e92b9a1d3a27ed3079536b0dfd7e29d06bd150e | |
parent | 5e1d993f5444c4617813943ce8376a69c0fefa8f [diff] [blame] |
py: Fix bug in compiler which allowed through illegal augmented assign. It allowed such things as (a, b) += c.
diff --git a/py/compile.c b/py/compile.c index f64a9e2..554d74b 100644 --- a/py/compile.c +++ b/py/compile.c
@@ -858,6 +858,9 @@ // empty tuple goto cannot_assign; } else if (MP_PARSE_NODE_IS_STRUCT_KIND(pns->nodes[0], PN_testlist_comp)) { + if (assign_kind != ASSIGN_STORE) { + goto bad_aug; + } pns = (mp_parse_node_struct_t*)pns->nodes[0]; goto testlist_comp; } else {