Better and smaller AWS fix

This commit is contained in:
Theo Arends 2019-12-18 11:54:31 +01:00
parent 46aec3acf5
commit ac1e153ec0
1 changed files with 1 additions and 2 deletions

View File

@ -590,8 +590,7 @@ char* SettingsText(uint32_t index)
case SET_WEBPWD: position = Settings.web_password; break;
#if defined(USE_MQTT_TLS) && defined(USE_MQTT_AWS_IOT)
case SET_MQTT_HOST:
strncpy(aws_mqtt_host, Settings.mqtt_user, strlen(Settings.mqtt_user));
strncpy(&aws_mqtt_host[strlen(Settings.mqtt_user)], Settings.mqtt_host, strlen(Settings.mqtt_host));
snprintf_P(aws_mqtt_host, sizeof(aws_mqtt_host), PSTR("%s%s"), Settings.mqtt_user, Settings.mqtt_host);
position = aws_mqtt_host; break;
case SET_MQTT_USER: position = aws_mqtt_user; break;
#else