From faa92e99151ccec81073cb7ded2d49458468a02d Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Tue, 8 Sep 2015 07:57:27 -0700 Subject: [PATCH] liblog: logprint: printable nul Change-Id: I57d1f86ce040ad196c558bb72ac0464af793c214 --- liblog/logprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblog/logprint.c b/liblog/logprint.c index c2f1545eb..3f1bb2fcc 100644 --- a/liblog/logprint.c +++ b/liblog/logprint.c @@ -774,7 +774,7 @@ WEAK ssize_t utf8_character_length(const char *src, size_t len) uint32_t utf32; if ((first_char & 0x80) == 0) { /* ASCII */ - return 1; + return first_char ? 1 : -1; } /*