From 6a87ae0fa79ff7bb73e8de8db2fb3dfce049e1fa Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 27 Jun 2019 10:24:51 -0400 Subject: [PATCH] fix compile warning by copying two bytes, which will grab the \0 after the \n --- src/zm_fifo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_fifo.cpp b/src/zm_fifo.cpp index 96e7c845e..0c0f836bd 100644 --- a/src/zm_fifo.cpp +++ b/src/zm_fifo.cpp @@ -91,7 +91,7 @@ void zmFifoDbgOutput( dbg_ptr += vsnprintf(dbg_ptr, str_size-(dbg_ptr-dbg_string), fstring, arg_ptr); } va_end(arg_ptr); - strncpy(dbg_ptr++, "\n", 1); + strncpy(dbg_ptr++, "\n", 2); int res = fwrite(dbg_string, dbg_ptr-dbg_string, 1, zm_fifodbg_log_fd); if ( res != 1 ) { fclose(zm_fifodbg_log_fd);