summaryrefslogtreecommitdiff
path: root/lib/lzss.cpp
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-10-21 09:56:09 -0700
committerPixel <pixel@nobis-crew.org>2009-10-21 09:56:09 -0700
commitceebadeefd68d37a680f1fa173d4a1f564538acc (patch)
tree110c484f97dfa5762e4ab0a69600924783c94b89 /lib/lzss.cpp
parent91e1b2a0b50088e3a5d556eabfd7c25b689edd07 (diff)
parentcfaf203f68cad99465ae3f93a007508ddf9c44dd (diff)
Merge branch 'master' of ssh+git://pixel@git.grumpycoder.net/pub/repo.git/PSX-Bundle
Diffstat (limited to 'lib/lzss.cpp')
-rw-r--r--lib/lzss.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/lzss.cpp b/lib/lzss.cpp
index 1d7ecfb..7d86a32 100644
--- a/lib/lzss.cpp
+++ b/lib/lzss.cpp
@@ -105,7 +105,7 @@ void lzss::compute_limits(void) {
printm(M_INFO, "Computed values: maxsize = %i, maxptr = 0x%06x\n", lzss_maxsize, lzss_maxptr);
}
-unsigned int lzss::lzss_decomp(Handle * f_source, Handle * f_cible, int true_length)
+unsigned int lzss::lzss_decomp(Handle * f_source, Handle * f_cible, int true_length, bool read_length)
{
unsigned char bitmap, fbitmap;
unsigned char valeur;
@@ -125,7 +125,8 @@ unsigned int lzss::lzss_decomp(Handle * f_source, Handle * f_cible, int true_len
compute_limits();
- f_source->read(&length, 4);
+ if (read_length)
+ f_source->read(&length, 4);
if (true_length >= 0) {
length = true_length;
}