changeset 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 4c5d3b990a3f
children fc166b3bbae3
files lwasm/pseudo.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;
 		}