From a44f7ad49d47bdc66647e34bb678ba672fe1289f Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 16 Feb 2016 10:04:24 -0500 Subject: [PATCH] LIB: Revert back the changes to mfile.cpp. It introduced null characters into the state file stream which we do not want. --- lib/mfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mfile.cpp b/lib/mfile.cpp index 93eb6b9c24..1290fccb2d 100644 --- a/lib/mfile.cpp +++ b/lib/mfile.cpp @@ -89,7 +89,7 @@ int MFILE::vprintf(const char* format, va_list ap) { ); exit(1); } - strlcpy(buf+len, buf2, n); + strncpy(buf+len, buf2, n); len += n; buf[len] = 0; return k; @@ -143,7 +143,7 @@ int MFILE::puts(const char* p) { ); exit(1); } - strlcpy(buf+len, p, n); + strncpy(buf+len, p, n); len += n; buf[len] = 0; return n;