the joys of UB or whatever that crap was

This commit is contained in:
2023-08-14 12:13:29 +02:00
parent 7aeb25e064
commit 15629abf19
4 changed files with 21 additions and 5 deletions

View File

@ -39,7 +39,8 @@ ReturnValue_t FilesystemMock::readFromFile(FileOpParams params, uint8_t **buffer
if (readSize + readLen > maxSize) {
return SerializeIF::STREAM_TOO_SHORT;
}
std::copy(info.fileRaw.data() + params.offset, info.fileRaw.data() + readLen, *buffer);
std::copy(info.fileRaw.data() + params.offset, info.fileRaw.data() + params.offset + readLen,
*buffer);
*buffer += readLen;
readSize += readLen;
}