Combee on Palm OS

Friday, 9 July 2004  10:09 AM

I'd been meaning to post this for the last month, but the email disappeared in the INBOX pile until I was reminded of it this morning.

CodeWarrior for Palm OS V9.3 has a bug in the file SplitRes.c. This is part of the PNO Loader library, and this file can be found in "CW for Palm OS Support\(ARMlet Support)\PNOLoader"

Line 89 of SplitRes.c looks like

if ((srcOffset + size) >= splitRes->totalSize)

The comparison is invalid and occasionally catches a border case. To fix this, change the line to read

if ((srcOffset + size) > splitRes->totalSize)

changing the greater-than-or-equal operator to greater-than. After making this change, you need to rebuild the PNOLoader.mcp project file to regenerate the static library, and then rebuild any PNO projects you have that are using this library.

The nature of this bug was to prevent PNO relocations from being processed some of the time. A big thanks to Lex Warners for finding the bug and supplying a fix.