From d6764679ed3735714acae44c5cf529a9d047dc8b Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 1 Mar 2009 15:03:08 +0100 Subject: Even more documentation ...and small cleanups. --- libpiano/src/crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpiano') diff --git a/libpiano/src/crypt.c b/libpiano/src/crypt.c index 2e6dd55..1b59533 100644 --- a/libpiano/src/crypt.c +++ b/libpiano/src/crypt.c @@ -105,7 +105,7 @@ char *PianoIntsToString (const unsigned int *arrInts, size_t arrIntsN) { for (i = 0; i < arrIntsN; i++) { /* map string to 4-byte int */ tmp = (unsigned int *) &strDecoded[i*4]; - /* FIXME: big endian does not need to byteswap? */ + /* FIXME: big endian does not need byteswap? */ *tmp = byteswap32 (arrInts[i]); } return strDecoded; @@ -219,8 +219,8 @@ char *PianoIntsToHexString (const unsigned int *arrInts, size_t arrIntsN) { size_t intMapN = arrIntsN * sizeof (*arrInts); for (i = 0; i < intMapN; i++) { - /* we need to swap the bytes again */ writePos = i + (4 - (i % 4) * 2) - 1; + /* we need to swap the bytes again */ hexStr[writePos*2] = (intMap[i] & 0xf0) < 0xa0 ? (intMap[i] >> 4) + '0' : (intMap[i] >> 4) + 'a' - 10; hexStr[writePos*2+1] = (intMap[i] & 0x0f) < 0x0a ? (intMap[i] & 0x0f) + -- cgit v1.2.3