diff --git a/ChangeLog b/ChangeLog
index 6f4f042d2..f26d9e634 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-14 Paolo Nenzi
+ * src/frontend/inp.c: fixed a bug in com_list() that skipped a line number
+ when in displaying the ".end" line. I just moved the line increment at the
+ end of the for cicle (after the instruction that skips the ".end" line).
+
+
2007-09-12 Dietmar Warning
* src/frontend/terminal.c: fixed segmentation fault occurring when messages
>4096 bytes are sent to out_printf() function. The fix uses asprintf if
diff --git a/src/frontend/inp.c b/src/frontend/inp.c
index 8701b99fa..0cb4231b8 100644
--- a/src/frontend/inp.c
+++ b/src/frontend/inp.c
@@ -135,7 +135,6 @@ top1:
for (here = deck; here; here = here->li_next) {
if (renumber)
here->li_linenum = i;
- i++;
if (ciprefix(".end", here->li_line) &&
!isalpha(here->li_line[4]))
continue;
@@ -156,6 +155,7 @@ top1:
fprintf(file, "%s\n", here->li_error);
}
}
+ i++;
}
if (extras) {
deck = extras;
@@ -173,7 +173,6 @@ top2:
if ((here->li_actual == NULL) || (here == deck)) {
if (renumber)
here->li_linenum = i;
- i++;
if (ciprefix(".end", here->li_line) &&
!isalpha(here->li_line[4]))
continue;
@@ -240,6 +239,7 @@ top2:
}
here->li_linenum = i;
}
+ i++;
}
if (extras) {
deck = extras;