From 968d170b7a0b744d522a58bf7e7453b19fcd48ca Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 13 Mar 2021 19:35:54 +0100 Subject: Fixes a compiler warning in debian --- src/render/tgafile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/tgafile.cc b/src/render/tgafile.cc index 15447df..ee12f8a 100644 --- a/src/render/tgafile.cc +++ b/src/render/tgafile.cc @@ -353,7 +353,7 @@ void TGA::save(const char *filename, Image & image) // write footer (optional, but the specification recommends it) char footer[26]; memset(footer, 0, sizeof(footer)); - strncpy(&footer[8] , "TRUEVISION-XFILE", 16); + memcpy(footer + 8 , "TRUEVISION-XFILE", 16); footer[24] = '.'; footer[25] = 0; ofs.write(footer, sizeof(footer)); -- cgit v1.2.3