summaryrefslogtreecommitdiff
path: root/lib/rbcodec/metadata
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-08-05 09:41:39 -0400
committerSolomon Peachy <pizza@shaftnet.org>2021-08-05 13:44:39 +0000
commit9f0f2c66586e8958aa852bc3e67053a875f67031 (patch)
treee5b291c4818ae50c41e78a84343e8184d1fbed90 /lib/rbcodec/metadata
parent566d836ac6170e6b5aff60f8becf4f825b454918 (diff)
downloadrockbox-9f0f2c66586e8958aa852bc3e67053a875f67031.tar.gz
rockbox-9f0f2c66586e8958aa852bc3e67053a875f67031.zip
metadata: Fix sign extension in get_uint64_le() routine
Change-Id: Ibd85cf72ac1babd1fa636c341b90b76bdfc0491b
Diffstat (limited to 'lib/rbcodec/metadata')
-rw-r--r--lib/rbcodec/metadata/metadata_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbcodec/metadata/metadata_common.c b/lib/rbcodec/metadata/metadata_common.c
index b062c5282d..0967570a5d 100644
--- a/lib/rbcodec/metadata/metadata_common.c
+++ b/lib/rbcodec/metadata/metadata_common.c
@@ -149,7 +149,7 @@ uint64_t get_uint64_le(void* buf)
149{ 149{
150 unsigned char* p = (unsigned char*) buf; 150 unsigned char* p = (unsigned char*) buf;
151 151
152 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24) | ((uint64_t)p[4] << 32) | 152 return ((uint64_t)p[0]) | ((uint64_t)p[1] << 8) | ((uint64_t)p[2] << 16) | ((uint64_t)p[3] << 24) | ((uint64_t)p[4] << 32) |
153 ((uint64_t)p[5] << 40) | ((uint64_t)p[6] << 48) | ((uint64_t)p[7] << 56); 153 ((uint64_t)p[5] << 40) | ((uint64_t)p[6] << 48) | ((uint64_t)p[7] << 56);
154} 154}
155 155