Merge pull request #2 from dron0gus/fragments-fix
fragments: if offset is bigger or EQUAL to current fragment size - sk…
This commit is contained in:
commit
948d5820f3
|
@ -14,7 +14,7 @@ void copyRange(uint8_t* destination, FragmentList src, size_t skip, size_t size)
|
|||
size_t fragmentIndex = 0;
|
||||
|
||||
// Find which fragment to start - skip any full fragments smaller than `skip` parameter
|
||||
while (fragmentIndex < src.count && skip > src.fragments[fragmentIndex].size) {
|
||||
while (fragmentIndex < src.count && skip >= src.fragments[fragmentIndex].size) {
|
||||
skip -= src.fragments[fragmentIndex].size;
|
||||
fragmentIndex++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue