Some modifications to increase stability

This commit is contained in:
Gunnar Skjold
2020-05-08 22:58:16 +02:00
parent c3c0ca0a1b
commit 953f2d4110
8 changed files with 91 additions and 60 deletions

View File

@@ -110,6 +110,12 @@ String HanReader::getString(int objectId) {
return getString(objectId, buffer, 0, bytesRead);
}
int HanReader::getBuffer(byte* buf) {
for (int i = 0; i < bytesRead; i++) {
buf[i] = buffer[i];
}
return bytesRead;
}
int HanReader::findValuePosition(int dataPosition, byte *buffer, int start, int length) {
// The first byte after the header gives the length

View File

@@ -29,6 +29,7 @@ public:
uint32_t getUint(int objectId); // Only for uint32
String getString(int objectId);
time_t getTime(int objectId);
int getBuffer(byte* buf);
private:
RemoteDebug* debugger;