# HG changeset patch # User Matti Hamalainen # Date 1633927962 -10800 # Node ID 5dde74cf43b37e54201ba01a382f05228e4ee0d1 # Parent 860fe188665dbc25b026d8daae802e2abcb914b4 Actually seek to the SID dataOffset when starting to read it. diff -r 860fe188665d -r 5dde74cf43b3 sidlib.c --- a/sidlib.c Sat Oct 09 16:20:45 2021 +0300 +++ b/sidlib.c Mon Oct 11 07:52:42 2021 +0300 @@ -183,6 +183,14 @@ hdrEnd = thftell(ctx); + // Seek to data + if (thfseek(ctx, psid->dataOffset, SEEK_SET) < 0) + { + ret = th_io_error(ctx, ctx->status, + "Error seeking to SID data."); + goto exit; + } + // If load address is 0, we need to get it if (psid->loadAddress == 0 && !thfread_le16(ctx, &psid->loadAddress))