diff lwasm/pragma.c @ 56:337301ddf74a

Fixed error with pragma and *pragma directives
author lost@l-w.ca
date Wed, 06 Apr 2011 00:12:01 -0600
parents cb4efc47ce9d
children 428068681cbf
line wrap: on
line diff
--- a/lwasm/pragma.c	Tue Apr 05 23:59:41 2011 -0600
+++ b/lwasm/pragma.c	Wed Apr 06 00:12:01 2011 -0600
@@ -106,6 +106,8 @@
 	
 	ps = lw_strndup(*p, t - *p);
 	*p = t;
+	
+	l -> len = 0;
 
 	if (parse_pragma_string(as, ps, 0) == 0)
 	{
@@ -124,6 +126,8 @@
 	ps = lw_strndup(*p, t - *p);
 	*p = t;
 
+	l -> len = 0;
+	
 	// *pragma must NEVER throw an error
 	parse_pragma_string(as, ps, 1);
 	lw_free(ps);