changeset 419:bf4664ed897d

sscanf() was used in unaligned access, causing problems on Sparc (and possibly other archs requiring alignment), fixed.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 10 Sep 2006 17:57:00 +0000
parents 226627246616
children e9e0b633d417
files src/xs_length.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xs_length.c	Sun Sep 10 17:47:05 2006 +0000
+++ b/src/xs_length.c	Sun Sep 10 17:57:00 2006 +0000
@@ -117,8 +117,9 @@
 	/* Get hash value */
 	linePos = 0;
 	for (i = 0; i < XS_MD5HASH_LENGTH; i++, linePos += 2) {
-		sscanf(&inLine[linePos], "%2x",
-		(guint *) &(tmpNode->md5Hash[i]));
+		gint tmpu;
+		sscanf(&inLine[linePos], "%2x", &tmpu);
+		tmpNode->md5Hash[i] = tmpu;
 	}
 		
 	/* Get playtimes */