shithub: mc

Download patch

ref: 62b6bf19b4d9f5412934bc0debed9c21769327f0
parent: ee911455669d60ab788cff57595e29329eb63611
author: Ori Bernstein <[email protected]>
date: Tue Sep 10 20:26:35 EDT 2013

Don't crash on specializing unions.

    We used the wrong entry. Oops.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -158,7 +158,7 @@
                     return 1;
             break;
         case Tyunion:
-            for (i = 0; i < t->nmemb; i++) {
+            for (i = 0; i < sub->nmemb; i++) {
                 if (sub->udecls[i]->etype && tyinfinite(st, t, sub->udecls[i]->etype))
                     return 1;
             }