summaryrefslogtreecommitdiffstats
path: root/src/cc4group.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cc4group.c')
-rw-r--r--src/cc4group.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cc4group.c b/src/cc4group.c
index ff42e51..a92b2b9 100644
--- a/src/cc4group.c
+++ b/src/cc4group.c
@@ -683,6 +683,12 @@ static bool cc4group_uncompressUntilPosition(CC4Group* const this, size_t const
rootGroup->readState.position = position;
}
+
+ // update for child groups
+ if(this != rootGroup)
+ {
+ this->readState.position = position;
+ }
return true;
}
@@ -3276,15 +3282,13 @@ static bool cc4group_openAsChildOn(CC4Group* const this, const char* const path,
GroupEntryList* children = cc4group_getChildren(this, entry); // this also loads the header of entry
child->root = *entry;
+ child->readState.position = this->readState.position;
child->root.parent = NULL;
child->root.core.FileName[0] = '\0';
child->root.children = children;
child->uncompressedData = this->uncompressedData;
- if(child->root.children == NULL)
- {
- return false;
- }
+ assert(child->root.children);
child->parent = this;
child->name = strdup(entry->core.FileName);