[Toybox] new toys: expand & unexpand

Ilya Kuzmich ilya.kuzmich at gmail.com
Sun Apr 1 17:15:07 PDT 2012


oups, apparently i did introduced a bug during last minute refactoring
-------------- next part --------------
diff -r a9ac4067c442 lib/expand.c
--- a/lib/expand.c	Sun Apr 01 12:07:03 2012 +0400
+++ b/lib/expand.c	Mon Apr 02 04:14:22 2012 +0400
@@ -50,9 +50,9 @@
 							*tablist_str);
 			} else {
 				if (t->len == allocated_size) {
+					allocated_size += TABLIST_GROWSIZ;
 					t->tabstops =
 						xrealloc(t->tabstops, sizeof(int) * allocated_size);
-					allocated_size += TABLIST_GROWSIZ;
 				}
 
 				tablist_str = endptr;


More information about the Toybox mailing list