mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fix bug in ULEB128 decoding (#2195)
This commit is contained in:
@@ -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<char>& 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) {
|
||||
|
||||
Reference in New Issue
Block a user