From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-629072-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id D602D1381F3
	for <garchives@archives.gentoo.org>; Fri, 20 Sep 2013 08:30:48 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5ACF8E0BA0;
	Fri, 20 Sep 2013 08:30:43 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 74833E0B29
	for <gentoo-commits@lists.gentoo.org>; Fri, 20 Sep 2013 08:30:42 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 8C71E33ECCD
	for <gentoo-commits@lists.gentoo.org>; Fri, 20 Sep 2013 08:30:41 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 8D683E5468
	for <gentoo-commits@lists.gentoo.org>; Fri, 20 Sep 2013 08:30:39 +0000 (UTC)
From: "Sven Eden" <sven.eden@gmx.de>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" <sven.eden@gmx.de>
Message-ID: <1379532592.b05730c5e293ea18745fe88c2885ce9f902a50ad.yamakuzure@gentoo>
Subject: [gentoo-commits] proj/ufed:master commit in: /
X-VCS-Repository: proj/ufed
X-VCS-Files: ufed-curses-checklist.c
X-VCS-Directories: /
X-VCS-Committer: yamakuzure
X-VCS-Committer-Name: Sven Eden
X-VCS-Revision: b05730c5e293ea18745fe88c2885ce9f902a50ad
X-VCS-Branch: master
Date: Fri, 20 Sep 2013 08:30:39 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 65c575e9-429d-4e9b-9cb6-dc6b785f9ffd
X-Archives-Hash: c3f9cc08ad09886bafdf2fb4d10fb73c

commit:     b05730c5e293ea18745fe88c2885ce9f902a50ad
Author:     Sven Eden <yamakuzure <AT> gmx <DOT> net>
AuthorDate: Wed Sep 18 19:29:52 2013 +0000
Commit:     Sven Eden <sven.eden <AT> gmx <DOT> de>
CommitDate: Wed Sep 18 19:29:52 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=b05730c5

findFlagStart() Fixed another potential endless loop

---
 ufed-curses-checklist.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ufed-curses-checklist.c b/ufed-curses-checklist.c
index 2ac712b..8a3e9e1 100644
--- a/ufed-curses-checklist.c
+++ b/ufed-curses-checklist.c
@@ -630,8 +630,8 @@ static int findFlagStart(sFlag* flag, int* index, sWrap** wrap, int* line, bool*
 			if (isDescLegal(flag, *index)) {
 				if (eWrap_normal == e_wrap) {
 					++(*line);
-					++usedLines;
 					++(*index);
+					++usedLines;
 				} else {
 					/* With wrapped descriptions there are two possible
 					 * situations:
@@ -665,6 +665,8 @@ static int findFlagStart(sFlag* flag, int* index, sWrap** wrap, int* line, bool*
 					}
 				} // End of handling wrapped lines
 			} // End of having a legal flag
+			else
+				++(*index);
 		} // end of moving to line 0
 
 		// Write back wrapPart: