changeset 203:b4a349f1c2f4

Actually fix the load address handling in hash calculation.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 11 Dec 2018 02:38:53 +0200
parents ae3e353731ae
children 0327fe1d0686
files sidlib.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/sidlib.c	Sat Dec 01 06:03:15 2018 +0200
+++ b/sidlib.c	Tue Dec 11 02:38:53 2018 +0200
@@ -81,11 +81,11 @@
             // Grab the load address
             psid->loadAddress = TH_LE16_TO_NATIVE(*(uint16_t *) data);
 
-            // .. do not include the load address to the hash if OLD SLDB format
+            // .. do not include the load address to the hash if NEW SLDB format
             if (newSLDB)
+                th_md5_append(state, &data[2], read - 2);
+            else
                 th_md5_append(state, data, read);
-            else
-                th_md5_append(state, &data[2], read - 2);
 
             first = FALSE;
         }