diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-04-28 15:24:02 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-04-28 15:24:02 +0200 |
| commit | f04da05df887b23be411d0ad30837af40716c3fb (patch) | |
| tree | ee5969e86d2a4b489cd6c8f3402268dd75a6d720 | |
| parent | ea60465d4a5baf3c530c58b216504717a94799cf (diff) | |
| download | cc4group-f04da05df887b23be411d0ad30837af40716c3fb.tar.gz cc4group-f04da05df887b23be411d0ad30837af40716c3fb.zip | |
Fix cc4group_buildChildren failing on small files at the end of the directory
| -rw-r--r-- | src/cc4group.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cc4group.c b/src/cc4group.c index 500d377..4a1bfa7 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -302,10 +302,9 @@ static bool buildChildren(CC4Group* const this, C4GroupEntryData* const entry, s C4GroupEntryData* childEntry = &GroupEntryListAppend(entry->children, (C4GroupEntryData){.core = *core, .data = childData + core->Offset, .memoryManagement = cc4group.MemoryManagement.Reference, .children = NULL, .parent = entry, .absolutePosition = entry->absolutePosition + childDataOffset + core->Offset})->value; - if(this->readState.position < childEntry->absolutePosition + sizeof(C4GroupHeader)) + if(this->readState.position < childEntry->absolutePosition) { childEntry->data = NULL; - } else if(core->Directory) { |
