We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c498f8f commit 520517fCopy full SHA for 520517f
src/UniversalTelegramBot.cpp
@@ -35,6 +35,8 @@
35
36
#include "UniversalTelegramBot.h"
37
38
+#define ZERO_COPY(STR) ((char*)STR.c_str())
39
+
40
UniversalTelegramBot::UniversalTelegramBot(String token, Client &client) {
41
_token = token;
42
#ifdef ARDUINO_ESP8266_RELEASE_2_5_0
@@ -424,7 +426,7 @@ int UniversalTelegramBot::getUpdates(long offset) {
424
426
425
427
// Parse response into Json object
428
DynamicJsonDocument doc(maxMessageLength);
- DeserializationError error = deserializeJson(doc, response);
429
+ DeserializationError error = deserializeJson(doc, ZERO_COPY(response));
430
#ifdef _debug
431
Serial.print(F("GetUpdates parsed jsonDoc: "));
432
serializeJson(doc, Serial);
0 commit comments