[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 3.0.18 update



reassign 124117 libnewt0
thanks

... in fact, looking at the code, the change that was made here has got to be
wrong.  The "for" loop is just freeing the same string, over and over again.
I guess it was supposed to be "free(tb->lines[i])" or some such, followed
by a single "free(tb->lines)".

p.

>--- newt-0.50.17/textbox.c	Tue Dec 18 12:16:55 2001
>+++ newt-0.50.17.pb/textbox.c	Mon Nov 12 20:37:26 2001
>@@ -370,11 +370,10 @@
>     const char * start, * end;
>     struct textbox * tb = co->data;
>     char * reflowed, * expanded;
>-    int i, badness, height;
>+    int badness, height;
> 
>     if (tb->lines) {
>-	for (i = 0; i < tb->numLines; i++)
>-	    free(tb->lines);
>+	free(tb->lines);
> 	tb->linesAlloced = tb->numLines = 0;
>     }
>
>p.
>
>




Reply to: