Skip to content

Commit

Permalink
Initialize all data chunk members
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauler125 committed Dec 17, 2024
1 parent 6b8ed3f commit d776575
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/logic/pakfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,14 @@ class CPakDataChunk
friend class CPakPage;

public:
CPakDataChunk() = default;
CPakDataChunk()
: pageIndex(0)
, pageOffset(0)
, size(0)
, alignment(0)
, released(false)
, pData(nullptr)
{}

CPakDataChunk(size_t size, uint8_t alignment, char* data) : pageIndex(0), pageOffset(0), size((int)size), alignment(alignment), pData(data), released(false) {};
CPakDataChunk(int pageIndex, int pageOffset, size_t size, uint8_t alignment, char* data) : pageIndex(pageIndex), pageOffset(pageOffset), size((int)size), alignment(alignment), pData(data), released(false) {};
Expand Down

0 comments on commit d776575

Please sign in to comment.