shithub: mc

Download patch

ref: 407ef33694a8ac5518297af488759b8f8df19e06
parent: a2d39ddf4e0d6dc324bd0af41d89c942f4f8a49c
author: Ori Bernstein <[email protected]>
date: Wed Mar 20 08:18:19 EDT 2013

Copy the entire union when generating matches.

    We don't want uninitialized junk in it's body.

--- a/6/simp.c
+++ b/6/simp.c
@@ -532,7 +532,7 @@
     val = temp(s, n->matchstmt.val);
     tmp = rval(s, n->matchstmt.val, val);
     if (val != tmp)
-        append(s, set(val, tmp));
+        append(s, assign(s, val, tmp));
     for (i = 0; i < n->matchstmt.nmatches; i++) {
         m = n->matchstmt.matches[i];