Mercurial > hg > sidinfo
changeset 162:7359170fbb7f
Clarify some comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 16 Feb 2018 21:24:28 +0200 |
parents | 58fe784a6e48 |
children | 179ffe97599c |
files | sidlib.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/sidlib.c Wed Feb 07 17:02:49 2018 +0200 +++ b/sidlib.c Fri Feb 16 21:24:28 2018 +0200 @@ -139,6 +139,7 @@ read = thfread(data, sizeof(uint8_t), PSID_BUFFER_SIZE, ctx); psid->dataSize += read; + // If load address is 0 in header and we have the first block, grab it if (first && psid->loadAddress == 0) { if (read < 4) @@ -148,17 +149,17 @@ goto error; } - // Grab the actual load address + // Grab the load address psid->loadAddress = TH_LE16_TO_NATIVE(*(uint16_t *) data); - // Strip load address (2 first bytes) + // .. do not include the load address to the hash th_md5_append(&state, &data[2], read - 2); first = FALSE; } else if (read > 0) { - // Append "as is" + // Append data "as is" th_md5_append(&state, data, read); } } while (read > 0 && !thfeof(ctx));