Fixed an error with renewal table loading

Follow up to 5d22e1c
Fixes #2040
Thanks to @Yuchinin
This commit is contained in:
Lemongrass3110 2017-04-05 22:33:15 +02:00
parent 5d204e55d3
commit ec1fe15d7d

View File

@ -3988,7 +3988,8 @@ int inter_config_read(char *cfgName)
if (!strncmpi(w1, RENEWALPREFIX, strlen(RENEWALPREFIX))) { if (!strncmpi(w1, RENEWALPREFIX, strlen(RENEWALPREFIX))) {
#ifdef RENEWAL #ifdef RENEWAL
// Copy the original name // 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 #else
// In Pre-Renewal the Renewal specific configurations can safely be ignored // In Pre-Renewal the Renewal specific configurations can safely be ignored
continue; continue;