diff --git a/tasmota/xdrv_10_scripter.ino b/tasmota/xdrv_10_scripter.ino index 645aa039c..04d6f322f 100755 --- a/tasmota/xdrv_10_scripter.ino +++ b/tasmota/xdrv_10_scripter.ino @@ -2402,9 +2402,9 @@ chknext: rstring[0] = 0; int8_t index = fvar; #ifdef MQTT_DATA_STRING - char *wd = TasmotaGlobal.mqtt_data; + char *wd = (char*)TasmotaGlobal.mqtt_data.c_str(); #else - char *wd = TasmotaGlobal.mqtt_data.c_str(); + char *wd = TasmotaGlobal.mqtt_data; #endif strlcpy(rstring, wd, glob_script_mem.max_ssize); if (index) { diff --git a/tasmota/xdrv_13_display.ino b/tasmota/xdrv_13_display.ino index 54ee98647..7334d1ece 100755 --- a/tasmota/xdrv_13_display.ino +++ b/tasmota/xdrv_13_display.ino @@ -1302,7 +1302,7 @@ void DisplayDTVarsTeleperiod(void) { char *json = (char*)malloc(jlen + 2); if (json) { #ifdef MQTT_DATA_STRING - strlcpy(json, TasmotaGlobal.mqtt_data.c_str(), jlen + 1); + strlcpy(json, (char*)TasmotaGlobal.mqtt_data.c_str(), jlen + 1); #else strlcpy(json, TasmotaGlobal.mqtt_data, jlen + 1); #endif @@ -1325,7 +1325,7 @@ void get_dt_mqtt(void) { ResponseJsonEnd(); } #ifdef MQTT_DATA_STRING - get_dt_vars(TasmotaGlobal.mqtt_data.c_str()); + get_dt_vars((char*)TasmotaGlobal.mqtt_data.c_str()); #else get_dt_vars(TasmotaGlobal.mqtt_data); #endif