From: Michael Vogt Date: Thu, 17 Sep 2009 14:44:25 +0000 (+0200) Subject: fix crash in textbox SetText when topLines != 0 X-Git-Tag: r0-52-11~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec535e367bff4e8aec0e6bee0456245002ff3eed;p=thirdparty%2Fnewt.git fix crash in textbox SetText when topLines != 0 --- diff --git a/textbox.c b/textbox.c index 639c9a9..ae84b74 100644 --- a/textbox.c +++ b/textbox.c @@ -306,7 +306,7 @@ void newtTextboxSetText(newtComponent co, const char * text) { for (i = 0; i < tb->numLines; i++) free(tb->lines[i]); free(tb->lines); - tb->linesAlloced = tb->numLines = 0; + tb->linesAlloced = tb->numLines = tb->topLine = 0; } expanded = expandTabs(text);