aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util.c b/util.c
index c27981a..a72a1bb 100644
--- a/util.c
+++ b/util.c
@@ -38,7 +38,10 @@ void print_string(const char* str) /* print string, slowly */
int i=0;
while(str[i])
{
- write(out_fd, &str[i], 1);
+ if(str[i]=='\n')
+ write(out_fd, "\r\n", 2);
+ else
+ write(out_fd, &str[i], 1);
fsync(out_fd);
usleep(SLEEP_TIME);
++i;