diff options
author | Greg Clayton <gclayton@apple.com> | 2016-06-28 17:14:18 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2016-06-28 17:14:18 +0000 |
commit | d781d2c9b7def23e1692509e2de6062b05b59fb1 (patch) | |
tree | 7446329c7c0b61991ffbc850e6b7e2739c9d4dce /lldb/source/Core/DataExtractor.cpp | |
parent | 85de98fd24205c095a653991bcab0a98d602e9b3 (diff) | |
download | bcm5719-llvm-d781d2c9b7def23e1692509e2de6062b05b59fb1.tar.gz bcm5719-llvm-d781d2c9b7def23e1692509e2de6062b05b59fb1.zip |
64-bit LEB values are not always correctly decoded due to a casting issue, now they are.
<rdar://problem/27002247>
llvm-svn: 274037
Diffstat (limited to 'lldb/source/Core/DataExtractor.cpp')
-rw-r--r-- | lldb/source/Core/DataExtractor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp index f7f01df3e9b..84446147a36 100644 --- a/lldb/source/Core/DataExtractor.cpp +++ b/lldb/source/Core/DataExtractor.cpp @@ -1237,7 +1237,7 @@ DataExtractor::GetULEB128 (offset_t *offset_ptr) const while (src < end) { uint8_t byte = *src++; - result |= (byte & 0x7f) << shift; + result |= (uint64_t)(byte & 0x7f) << shift; if ((byte & 0x80) == 0) break; shift += 7; @@ -1280,7 +1280,7 @@ DataExtractor::GetSLEB128 (offset_t *offset_ptr) const { bytecount++; byte = *src++; - result |= (byte & 0x7f) << shift; + result |= (int64_t)(byte & 0x7f) << shift; shift += 7; if ((byte & 0x80) == 0) break; |