From 22b05c97a3f9ab318b737a14bc9beb10197718de Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Wed, 4 Sep 2024 23:47:13 +0200 Subject: 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 --- lib/rbcodec/codecs/cRSID/host/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rbcodec/codecs/cRSID/host/file.c') 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; } -- cgit v1.2.3