aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sisfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisfile.cpp')
-rw-r--r--lib/sisfile.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sisfile.cpp b/lib/sisfile.cpp
index c5d7139..62a2ce1 100644
--- a/lib/sisfile.cpp
+++ b/lib/sisfile.cpp
@@ -28,6 +28,18 @@
#include <stdio.h>
+SISFile::SISFile()
+{
+ m_buf = 0;
+ m_ownBuffer = false;
+}
+
+SISFile::~SISFile()
+{
+ if (m_ownBuffer)
+ delete[] m_buf;
+}
+
SisRC
SISFile::compareApp(SISFile* other)
{
@@ -38,6 +50,7 @@ SisRC
SISFile::fillFrom(uint8_t* buf, off_t len)
{
int ix = 0;
+ m_buf = buf;
SisRC rc = m_header.fillFrom(buf, &ix, len);
if (rc != SIS_OK)
{