From 175fc1f650e96af0c7581ddeb0058b33f63b2ad7 Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 11 May 2019 20:18:29 +0000 Subject: [PATCH] Fix gcc-9 -Wstringop-truncation in gamepal.cpp --- d2x-rebirth/main/gamepal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2x-rebirth/main/gamepal.cpp b/d2x-rebirth/main/gamepal.cpp index 3732ce824..4a2111b5b 100644 --- a/d2x-rebirth/main/gamepal.cpp +++ b/d2x-rebirth/main/gamepal.cpp @@ -58,7 +58,7 @@ int load_palette(const char *name,int used_for_level,int no_change_screen) //special hack to tell that palette system about a pig that's been loaded elsewhere if (used_for_level == -2) { - strncpy(last_palette_loaded_pig,name,sizeof(last_palette_loaded_pig)); + strncpy(last_palette_loaded_pig, name, sizeof(last_palette_loaded_pig) - 1); return 1; }