Gain a little code space on WebSend response

Gain a little code space on WebSend response
This commit is contained in:
Theo Arends 2019-08-19 11:21:00 +02:00
parent cae714e300
commit 7d690dcc1b
1 changed files with 4 additions and 3 deletions

View File

@ -2401,10 +2401,11 @@ int WebSend(char *buffer)
if (http_code == HTTP_CODE_OK || http_code == HTTP_CODE_MOVED_PERMANENTLY) {
#ifdef USE_WEBSEND_RESPONSE
// Return received data to the user - Adds 900+ bytes to the code
String result = http.getString(); // File found at server - may need lot of ram or trigger out of memory!
const char* read = http.getString().c_str(); // File found at server - may need lot of ram or trigger out of memory!
uint32_t j = 0;
for (uint32_t i = 0; i < result.length(); i++) {
char text = result.charAt(i);
char text = '.';
while (text != '\0') {
text = *read++;
if (text > 31) { // Remove control characters like linefeed
mqtt_data[j++] = text;
if (j == sizeof(mqtt_data) -2) { break; }