diff lwasm/struct.c @ 48:1134255553bc

Fix not defining the symbol when instantiating a struct
author lost@l-w.ca
date Mon, 04 Apr 2011 22:20:38 -0600
parents 1d6a31a2586b
children ccaecdff3fc2
line wrap: on
line diff
--- a/lwasm/struct.c	Mon Apr 04 22:15:33 2011 -0600
+++ b/lwasm/struct.c	Mon Apr 04 22:20:38 2011 -0600
@@ -244,7 +244,8 @@
 		lw_free(t);
 	}
 
-	l -> symset = 1;
+	if (as -> instruct)
+		l -> symset = 1;
 	if (as -> instruct)
 		register_struct_entry(as, l, s -> size, s);
 	return 0;