From 58ac6ae20812deb5acc77d1546665fd3b00c2d60 Mon Sep 17 00:00:00 2001 From: Peter Conrad Date: Sat, 18 Aug 2018 21:13:32 +0200 Subject: [PATCH] Changed some casts to uint64_t --- include/fc/io/raw.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fc/io/raw.hpp b/include/fc/io/raw.hpp index c7035ec..8bd0163 100644 --- a/include/fc/io/raw.hpp +++ b/include/fc/io/raw.hpp @@ -193,10 +193,10 @@ namespace fc { uint64_t v = 0; char b = 0; uint8_t by = 0; do { s.get(b); - v |= uint32_t(uint8_t(b) & 0x7f) << by; + v |= uint64_t(uint8_t(b) & 0x7f) << by; by += 7; } while( uint8_t(b) & 0x80 ); - vi.value = static_cast(v); + vi.value = static_cast(v); } template inline void unpack( Stream& s, const T& vi, uint32_t _max_depth )