From a8825349796cdff6c6f782a496fe36b3b34e91b9 Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Mon, 26 Sep 2016 19:56:46 +0300 Subject: [PATCH] Fix bug in print_for_human --- src/print_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/print_helper.c b/src/print_helper.c index 15d409e..995a47b 100644 --- a/src/print_helper.c +++ b/src/print_helper.c @@ -14,7 +14,7 @@ int print_ascii_tbl (FILE *stream) { int print_for_human (FILE *stream, const unsigned char *array, const int len) { for (int i = 0; i < len; i++) { if (array[i] >= ' ' && array[i] <= '~') { - if(!fprintf(stream, "%c ", array[i])) { + if(!fprintf(stream, "%c", array[i])) { return 0; } } else { @@ -23,5 +23,5 @@ int print_for_human (FILE *stream, const unsigned char *array, const int len) { } } } - return 0; + return fprintf(stream, "\n");; }