diff options
Diffstat (limited to 'xorg-server/os/log.c')
-rw-r--r-- | xorg-server/os/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c index a368569d0..2a721b948 100644 --- a/xorg-server/os/log.c +++ b/xorg-server/os/log.c @@ -697,7 +697,7 @@ LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list a if (sizeof(buf) - len == 1) buf[len - 1] = '\n'; - newline = (buf[len - 1] == '\n'); + newline = (len > 0 && buf[len - 1] == '\n'); LogSWrite(verb, buf, len, newline); } |