summaryrefslogtreecommitdiff
path: root/zwgc/tty_filter.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1989-11-15 18:24:03 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1989-11-15 18:24:03 +0000
commit89c43ac4c4f6ded5da8b9200796916282130ca74 (patch)
treeea7fd47908dfe334d6e10fd05b688bf8f4017913 /zwgc/tty_filter.c
parent709d5841bd2b7d1f147dc34f0811a157a25f2495 (diff)
be sure to end with CRLF
Diffstat (limited to 'zwgc/tty_filter.c')
-rw-r--r--zwgc/tty_filter.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zwgc/tty_filter.c b/zwgc/tty_filter.c
index c62ace7..0e0e3fb 100644
--- a/zwgc/tty_filter.c
+++ b/zwgc/tty_filter.c
@@ -497,5 +497,9 @@ string tty_filter(text, use_fonts)
free_info(info);
free(text_copy);
+ if (number_of_lines &&
+ (result_so_far[string_Length(result_so_far)-1] != '\n'))
+ /* CRLF-terminate all results */
+ result_so_far = string_Concat2(result_so_far, "\r\n");
return(result_so_far);
}