# HG changeset patch # User Matti Hamalainen # Date 1518809068 -7200 # Node ID 7359170fbb7fdc346363975d76cb960cc7e12c82 # Parent 58fe784a6e48bfea3d38d40ade0293565e21ac30 Clarify some comments. diff -r 58fe784a6e48 -r 7359170fbb7f sidlib.c --- 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));