From 0c6f24562f01d4c1cd5af5e54332696e95e074de Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 24 Dec 2019 14:12:42 -0600 Subject: [PATCH] Fix bug in ULEB128 decoding (#2195) --- wpiutil/src/main/native/cpp/leb128.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpiutil/src/main/native/cpp/leb128.cpp b/wpiutil/src/main/native/cpp/leb128.cpp index ce68ed8f25..202ee9a339 100644 --- a/wpiutil/src/main/native/cpp/leb128.cpp +++ b/wpiutil/src/main/native/cpp/leb128.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2015-2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2015-2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -38,7 +38,7 @@ uint64_t WriteUleb128(SmallVectorImpl& dest, uint64_t val) { } uint64_t ReadUleb128(const char* addr, uint64_t* ret) { - uint32_t result = 0; + uint64_t result = 0; int shift = 0; size_t count = 0; @@ -59,7 +59,7 @@ uint64_t ReadUleb128(const char* addr, uint64_t* ret) { } bool ReadUleb128(raw_istream& is, uint64_t* ret) { - uint32_t result = 0; + uint64_t result = 0; int shift = 0; while (1) {