Michael Thomas 0df5e29
--- backgammon/common_source/fancy.c.orig	2010-04-18 16:59:55.000000000 -0700
Michael Thomas 0df5e29
+++ backgammon/common_source/fancy.c	2010-04-18 17:27:47.000000000 -0700
Michael Thomas 0df5e29
@@ -575,7 +575,7 @@
Michael Thomas 0df5e29
 	}
Michael Thomas 0df5e29
 	curr = curc = 0;	/* fix position markers */
Michael Thomas 0df5e29
 	realr = realc = -1;
Michael Thomas 0df5e29
-	for (i = 0; i < 24; i++)/* clear line counts */
Michael Thomas 0df5e29
+	for (i = 0; i < LI; i++)/* clear line counts */
Michael Thomas 0df5e29
 		linect[i] = -1;
Michael Thomas 0df5e29
 	buffnum = -1;		/* ignore leftover buffer contents */
Michael Thomas 0df5e29
 	tputs(CL, CO, addbuf);	/* put CL in buffer */
Michael Thomas 0df5e29
@@ -726,9 +726,9 @@
Michael Thomas 0df5e29
 		lUP = strlen(UP);
Michael Thomas 0df5e29
 	if (ND)
Michael Thomas 0df5e29
 		lND = strlen(ND);
Michael Thomas 0df5e29
+	linect = (int *) calloc(LI + 1, sizeof(int));
Michael Thomas 0df5e29
 	if (LI < 24 || CO < 72 || !(CL && UP && ND))
Michael Thomas 0df5e29
 		return (0);
Michael Thomas 0df5e29
-	linect = (int *) calloc(LI + 1, sizeof(int));
Michael Thomas 0df5e29
 	if (linect == NULL) {
Michael Thomas 0df5e29
 		write(2, "\r\nOut of memory!\r\n", 18);
Michael Thomas 0df5e29
 		getout(0);