Dear Plucker developers,
I try Plucker 1.1 and like it. Thanks for your work.
Yet a bug occurs to me when it opens a large image (I tried the book "Thinking in
Java" using 8-bit bpp). The handheld simply crashes and needs reset. This problem is
repeatable in the POSE simulator.
Though new to Palm programming, I read the code and do some experiments (as a learning
process!), and figure out that the function UnZip in file uncompress.c is causing the
problem. The following quick fix seems to work. I'm not sure whether UnDoc (or
elsewhere) needs similar changes or not.
Hope it helps. :)
Kendrew Lau
---
do {
z.next_out = outBuf;
z.avail_out = ZBUFSIZE;
err = inflate(&z, Z_FINISH);
/* fix begins */
if (DmWriteCheck(uncompressPtr, outSize,
ZBUFSIZE - z.avail_out))
{
inflateEnd(&z);
MemPtrFree(outBuf);
outBuf = NULL;
MemHandleUnlock(uncompressHandle);
return NULL;
}
/* fix ends */
DmWrite(uncompressPtr, outSize, outBuf,
ZBUFSIZE - z.avail_out);
outSize += ZBUFSIZE - z.avail_out;
} while (z.avail_out != ZBUFSIZE);
inflateEnd(&z);
_____________________________________________________
HKISS.COM
Hong Kong Internet Storage Service
Build your own website at http://www.hkiss.com
HKEM.COM
Sent by Hong Kong E-Mail at http://www.hkem.com
It's free. It's easy. Sign up your account Now!
_____________________________________________________