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 4c2668c commit a0ec19eCopy full SHA for a0ec19e
Cbor/CborDecoder.cpp
@@ -1,6 +1,5 @@
1
#include "CborDecoder.h"
2
#include "Arduino.h"
3
-#include <stdlib.h>
4
5
6
@@ -343,10 +342,10 @@ void CborReader::Run() {
343
342
} else break;
344
} else if(state == STATE_STRING_DATA) {
345
if(input->hasBytes(currentLength)) {
346
- unsigned char *data = new unsigned char[currentLength];
+ unsigned char data[currentLength];
347
input->getBytes(data, currentLength);
348
state = STATE_TYPE;
349
- String str(*data);
+ String str = (const char *) data;
350
listener->OnString(str);
351
352
} else if(state == STATE_ARRAY) {
0 commit comments