comparison sidinfo.c @ 39:3ce9d2198193

Grab the actual loading address from data block if PSID header loadAddr value is 0.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 27 Sep 2014 15:30:25 +0300
parents 1d62d7a4958a
children 3414fc882229
comparison
equal deleted inserted replaced
38:810dc2fae474 39:3ce9d2198193
382 if (read < 4) 382 if (read < 4)
383 { 383 {
384 THERR("Error reading song data, unexpectedly small file.\n"); 384 THERR("Error reading song data, unexpectedly small file.\n");
385 goto error; 385 goto error;
386 } 386 }
387
388 // Grab the actual load address
389 psid->loadAddress = TH_LE16_TO_NATIVE(*(uint16_t *) fileData);
387 390
388 // Strip load address (2 first bytes) 391 // Strip load address (2 first bytes)
389 th_md5_append(&state, &fileData[2], read - 2); 392 th_md5_append(&state, &fileData[2], read - 2);
390 first = FALSE; 393 first = FALSE;
391 } 394 }