changeset 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 bd8b3fbd1e28
files lwasm/struct.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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;