Check junk at end of line with the repeat directives.

This commit is contained in:
Olaf Seibert
2021-01-23 18:37:47 +01:00
parent 40b41c3087
commit 6f1af83101
4 changed files with 38 additions and 21 deletions

View File

@@ -84,6 +84,12 @@ STREAM *expand_rept(
free_tree(value);
return NULL;
}
/*
* Reading the next lines-to-be-repeated overwrites the line buffer
* that the caller is using. So for junk-at-end-of-line checking we
* need to do it here.
*/
check_eol(stack, value->cp);
list_value(stack->top, value->data.lit);
@@ -214,6 +220,8 @@ STREAM *expand_irp(
return NULL;
}
check_eol(stack, cp);
gb = new_buffer();
levelmod = 0;
@@ -342,6 +350,8 @@ STREAM *expand_irpc(
return NULL;
}
check_eol(stack, cp);
gb = new_buffer();
levelmod = 0;