summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-05-15 04:13:48 +0200
committerGravatar Nikias Bassen2020-05-15 04:13:48 +0200
commit42e40aacc333ee759425e7d64124d31c312c6f40 (patch)
tree8f51b80352f502b9364cdd9db48d6744dec8efea
parent916adfe3995152092d4d7cde3171d690292ffc51 (diff)
downloadlibimobiledevice-42e40aacc333ee759425e7d64124d31c312c6f40.tar.gz
libimobiledevice-42e40aacc333ee759425e7d64124d31c312c6f40.tar.bz2
idevicesyslog: Fix color code escape sequences printing null-byte
-rw-r--r--tools/idevicesyslog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/idevicesyslog.c b/tools/idevicesyslog.c
index b3a754f..36cf420 100644
--- a/tools/idevicesyslog.c
+++ b/tools/idevicesyslog.c
@@ -92,7 +92,7 @@ static int lp = 0;
#define COLOR_WHITE "\e[1;37m"
#define COLOR_DARK_WHITE "\e[0;37m"
-#define TEXT_COLOR(x) if (use_colors) { fwrite(x, 1, sizeof(x), stdout); }
+#define TEXT_COLOR(x) if (use_colors) { fwrite(x, 1, sizeof(x)-1, stdout); }
static void add_filter(const char* filterstr)
{