summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cc4group.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cc4group.c b/src/cc4group.c
index b086110..f07cdeb 100644
--- a/src/cc4group.c
+++ b/src/cc4group.c
@@ -2056,12 +2056,15 @@ static const uint8_t* cc4group_getOnlyEntryData(CC4Group* const this, const C4Gr
{
if(this->lazy)
{
- if(!cc4group_uncompressUntilPosition(this, entry->absolutePosition + entry->core.Size))
+ if(!entry->data && entry->core.Size > 0)
{
- return NULL;
- }
+ if(!cc4group_uncompressUntilPosition(this, entry->absolutePosition + entry->core.Size))
+ {
+ return NULL;
+ }
- ((C4GroupEntryData*)entry)->data = this->uncompressedData + entry->absolutePosition;
+ ((C4GroupEntryData*)entry)->data = this->uncompressedData + entry->absolutePosition;
+ }
}
else if(entry->path != NULL && entry->data == NULL)
{