diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-11-26 20:41:52 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-11-26 20:41:52 +0200 |
commit | b3388ecca941bbd76ecca9413c78295c97b9013c (patch) | |
tree | a2b878d9e9abfd29d1f9650ff0dac216195d27ab /debug.c | |
parent | cedf898bfd8d45a028d087a512fe7c1c789ee6dc (diff) | |
parent | a42eaf5184b2d5e0628bb6afac61745bde138ee4 (diff) | |
download | egawk-b3388ecca941bbd76ecca9413c78295c97b9013c.tar.gz egawk-b3388ecca941bbd76ecca9413c78295c97b9013c.tar.bz2 egawk-b3388ecca941bbd76ecca9413c78295c97b9013c.zip |
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1299,10 +1299,11 @@ do_set_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) arg = arg->next; val = arg->a_node; lhs = get_field(field_num, &assign); - unref(*lhs); - *lhs = dupnode(val); if (assign) + /* call assign to copy fields before unref frees $0 */ assign(); + unref(*lhs); + *lhs = dupnode(val); print_field(field_num); } break; |