diff lwasm/pseudo.c @ 393:f2decd9b276d

Fix minor error in string parsing Growing a buffer by 32 bytes and then only saying the buffer grew by one byte is not exactly efficient. While not strictly broken, it's dumb. Fix it to actually count the 32 bytes.
author William Astle <lost@l-w.ca>
date Tue, 14 Jul 2015 23:12:24 -0600
parents 6ee9c67a0f8d
children 4411a6123716
line wrap: on
line diff
--- a/lwasm/pseudo.c	Tue Jul 14 23:01:57 2015 -0600
+++ b/lwasm/pseudo.c	Tue Jul 14 23:12:24 2015 -0600
@@ -306,7 +306,7 @@
 			if (blen >= bsize)
 			{
 				str = lw_realloc(str, bsize + 32);
-				bsize++;
+				bsize += 32;
 			}
 			str[blen++] = **p;
 		}