metadata: Fix sign extension in get_uint64_le() routine
Change-Id: Ibd85cf72ac1babd1fa636c341b90b76bdfc0491b
This commit is contained in:
parent
566d836ac6
commit
9f0f2c6658
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ uint64_t get_uint64_le(void* buf)
|
|||
{
|
||||
unsigned char* p = (unsigned char*) buf;
|
||||
|
||||
return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24) | ((uint64_t)p[4] << 32) |
|
||||
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) |
|
||||
((uint64_t)p[5] << 40) | ((uint64_t)p[6] << 48) | ((uint64_t)p[7] << 56);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue