From ec535e367bff4e8aec0e6bee0456245002ff3eed Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 17 Sep 2009 16:44:25 +0200 Subject: [PATCH] fix crash in textbox SetText when topLines != 0 --- textbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.2