aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sisfile.cpp
diff options
context:
space:
mode:
authorDaniel Brahneborg <basic@chello.se>2002-03-19 13:34:53 +0000
committerDaniel Brahneborg <basic@chello.se>2002-03-19 13:34:53 +0000
commit89a3d9a86c9f948829ab173b811709f74685bfe6 (patch)
treebeb4e5806d47b4f4c7d4335deecaf205b4e9634a /lib/sisfile.cpp
parenta7f48478e5126a8cd4b729109ab7aacabc615c66 (diff)
downloadplptools-89a3d9a86c9f948829ab173b811709f74685bfe6.tar.gz
plptools-89a3d9a86c9f948829ab173b811709f74685bfe6.tar.bz2
plptools-89a3d9a86c9f948829ab173b811709f74685bfe6.zip
Remove the previous version (unconditionally) before installing the new
version.
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)
{