From ec1fe15d7d480e4fa6ff3f56986bbfd49a4cde2a Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Wed, 5 Apr 2017 22:33:15 +0200 Subject: [PATCH] Fixed an error with renewal table loading Follow up to 5d22e1c Fixes #2040 Thanks to @Yuchinin --- src/map/map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/map/map.c b/src/map/map.c index c7e326b3b8..bd69e816fd 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3988,7 +3988,8 @@ int inter_config_read(char *cfgName) if (!strncmpi(w1, RENEWALPREFIX, strlen(RENEWALPREFIX))) { #ifdef RENEWAL // Copy the original name - safestrncpy(w1, w1 + strlen(RENEWALPREFIX), strlen(w1) - strlen(RENEWALPREFIX)); + // Do not use safestrncpy here - enforces zero termination before copying and will break it [Lemongrass] + strncpy(w1, w1 + strlen(RENEWALPREFIX), strlen(w1) - strlen(RENEWALPREFIX) + 1); #else // In Pre-Renewal the Renewal specific configurations can safely be ignored continue;