From: Michael Schroeder Date: Thu, 18 Oct 2012 14:09:32 +0000 (+0200) Subject: fix encoding of big values X-Git-Tag: upstream/0.2.0~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3215df165b44d7bd90f2a5cfa0bc821f5545cf55;p=platform%2Fupstream%2Flibsolv.git fix encoding of big values --- diff --git a/src/repopack.h b/src/repopack.h index c551022..81b7b88 100644 --- a/src/repopack.h +++ b/src/repopack.h @@ -41,6 +41,7 @@ data_read_id(unsigned char *dp, Id *idp) *idp = x; return dp + 5; } + x ^= 80; dp += 5; for (;;) { @@ -87,7 +88,7 @@ data_read_num64(unsigned char *dp, unsigned int *low, unsigned int *high) *high = (dp[0] ^ 0x80) >> 4; return dp + 5; } - x = (unsigned long long)(dp[0] ^ 0x80) << 28 ^ (unsigned int)(dp[1] << 21 ^ dp[2] << 14 ^ dp[3] << 7 ^ dp[4] ^ 0x10204000); + x = (unsigned long long)(dp[0] ^ 0x80) << 28 ^ (unsigned int)(dp[1] << 21 ^ dp[2] << 14 ^ dp[3] << 7 ^ dp[4] ^ 0x10204080); dp += 5; for (;;) {