From b05730c5e293ea18745fe88c2885ce9f902a50ad Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Wed, 18 Sep 2013 21:29:52 +0200 Subject: 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: -- cgit v1.2.3-65-gdbad