Skip to content

Commit

Permalink
Decode with uint32_t
Browse files Browse the repository at this point in the history
Summary: As title.

Reviewed By: wsanville

Differential Revision: D47484915

fbshipit-source-id: 1708362c718e15be7a94c69b961ad24042a46036
  • Loading branch information
agampe authored and facebook-github-bot committed Jul 17, 2023
1 parent b51d142 commit f9defa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/DexEncoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ namespace details {
*/
inline uint32_t read_uleb128(const uint8_t** _ptr) {
const uint8_t* ptr = *_ptr;
int result = *(ptr++);
uint32_t result = *(ptr++);

if (result > 0x7f) {
int cur = *(ptr++);
uint32_t cur = *(ptr++);
result = (result & 0x7f) | ((cur & 0x7f) << 7);
if (cur > 0x7f) {
cur = *(ptr++);
Expand Down

0 comments on commit f9defa6

Please sign in to comment.