[PATCH] small fix for save.c:show_attachment_page()

Dennis Preiser <[email protected]> Sat, 6 Nov 2010 13:52:27 +0100
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
In save.c:show_attachment_page() we determine the largest
content-type/encoding... -part of all attachments (info_len). The
current loop starts at attmenu.first (first line/attachment on screen)
which is wrong. The loop has to start at 0 to consider all attachments,
otherwise the screen layout may change during scrolling.

Dennis

diff -urp tin-1.9.6/src/save.c tin-1.9.6_r1/src/save.c
--- tin-1.9.6/src/save.c	2010-10-29 17:17:43.000000000 +0200
+++ tin-1.9.6_r1/src/save.c	2010-11-06 13:27:26.000000000 +0100
@@ -1524,7 +1524,7 @@ show_attachment_page(
 		attmenu.curr = 0;
 
 	info_len = max_depth = 0;
-	for (i = attmenu.first; i < attmenu.max; ++i) {
+	for (i = 0; i < attmenu.max; ++i) {
 		part = get_part(i);
 		snprintf(buf, sizeof(buf), _(txt_attachment_lines), part->line_count);
 		tmp_len = strwidth(buf);