diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2024-09-04 23:47:13 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2024-09-05 16:16:18 +0200 |
commit | 22b05c97a3f9ab318b737a14bc9beb10197718de (patch) | |
tree | 08df0ef433a6e14369c60b7de55cd13ebde72d20 | |
parent | 55e1a78cf8201fa2f19f76feeb22cfb9ff526cc7 (diff) | |
download | rockbox-22b05c97a3.tar.gz rockbox-22b05c97a3.zip |
codec: cRSID: check whole load address
Due to a typo, only the high byte of the embedded load address was
checked to be empty. For a full check, high and low byte must be
evaluated, of course. Also, fixed in cRSID 1.3.
Change-Id: Ib0b701622b006ab4bb1791f07bf17b3b06a70719
-rw-r--r-- | lib/rbcodec/codecs/cRSID/host/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbcodec/codecs/cRSID/host/file.c b/lib/rbcodec/codecs/cRSID/host/file.c index c87f37ebb4..817cff6c2b 100644 --- a/lib/rbcodec/codecs/cRSID/host/file.c +++ b/lib/rbcodec/codecs/cRSID/host/file.c @@ -39,7 +39,7 @@ cRSID_SIDheader* cRSID_processSIDfile(cRSID_C64instance* C64, unsigned char* fil for (i=1; i < (int)(sizeof(MagicStringPSID)-1); ++i) { if (SIDheader->MagicString[i] != MagicStringPSID[i]) return NULL; } C64->RealSIDmode = ( SIDheader->MagicString[0] == 'R' ); - if (SIDheader->LoadAddressH==0 && SIDheader->LoadAddressH==0) { //load-address taken from first 2 bytes of the C64 PRG + if (SIDheader->LoadAddressH==0 && SIDheader->LoadAddressL==0) { //load-address taken from first 2 bytes of the C64 PRG C64->LoadAddress = (filedata[SIDheader->HeaderSize+1]<<8) + (filedata[SIDheader->HeaderSize+0]); SIDdataOffset = SIDheader->HeaderSize+2; } |