inpcom.c, add missing condition `!comfile' for .title and .end processing

This commit is contained in:
rlar 2013-11-03 18:53:45 +01:00
parent 5bc8429b2f
commit a235b46795
1 changed files with 2 additions and 2 deletions

View File

@ -907,7 +907,7 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
add a terminal ".end" card
*/
if (call_depth == 0) {
if (call_depth == 0 && !comfile) {
if (found_end == TRUE) {
struct line *x = xx_new_line(NULL, copy(".end"), line_number++, line_number_orig++);
end->li_next = x;
@ -916,7 +916,7 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
}
/* Replace first line with the new title, if available */
if (call_depth == 0 && new_title) {
if (call_depth == 0 && !comfile && new_title) {
tfree(cc->li_line);
cc->li_line = new_title;
}