comparison src/xs_length.c @ 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 d2e6682d3ef8
comparison
equal deleted inserted replaced
418:226627246616 419:bf4664ed897d
115 } 115 }
116 116
117 /* Get hash value */ 117 /* Get hash value */
118 linePos = 0; 118 linePos = 0;
119 for (i = 0; i < XS_MD5HASH_LENGTH; i++, linePos += 2) { 119 for (i = 0; i < XS_MD5HASH_LENGTH; i++, linePos += 2) {
120 sscanf(&inLine[linePos], "%2x", 120 gint tmpu;
121 (guint *) &(tmpNode->md5Hash[i])); 121 sscanf(&inLine[linePos], "%2x", &tmpu);
122 tmpNode->md5Hash[i] = tmpu;
122 } 123 }
123 124
124 /* Get playtimes */ 125 /* Get playtimes */
125 if (inLine[linePos] != 0) { 126 if (inLine[linePos] != 0) {
126 if (inLine[linePos] != '=') { 127 if (inLine[linePos] != '=') {