aboutsummaryrefslogtreecommitdiffstats
path: root/com32/cmenu/libmenu
diff options
context:
space:
mode:
Diffstat (limited to 'com32/cmenu/libmenu')
-rw-r--r--com32/cmenu/libmenu/help.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/com32/cmenu/libmenu/help.c b/com32/cmenu/libmenu/help.c
index 0df1e103..ff917d92 100644
--- a/com32/cmenu/libmenu/help.c
+++ b/com32/cmenu/libmenu/help.c
@@ -54,10 +54,9 @@ static int countlines(char *buffer)
static void printtext(char *buf, int from)
{
char *f, *t;
- int right, nlines, i;
+ int nlines, i;
// clear window to print
- right = nc - HELP_RIGHT_MARGIN;
nlines = nr - HELP_BODY_ROW - HELP_BOTTOM_MARGIN - 1;
f = findline(buf, from);
@@ -66,7 +65,8 @@ static void printtext(char *buf, int from)
if (*f == '\n')
f++; // start of from+1st line
t = f;
- while (i < nlines) {
+
+ for (i = 0; i < nlines; i++) {
gotoxy(HELP_BODY_ROW + i, HELP_LEFT_MARGIN);
clear_end_of_line();
putchar(SO);
@@ -83,7 +83,6 @@ static void printtext(char *buf, int from)
}
putchar('\n');
t++;
- i++;
}
}