storages: fix writing varints on big endian
This commit is contained in:
parent
bdda084651
commit
32c3834948
|
@ -40,7 +40,7 @@ namespace epee
|
|||
template<class pack_value, class t_stream>
|
||||
size_t pack_varint_t(t_stream& strm, uint8_t type_or, size_t& pv)
|
||||
{
|
||||
pack_value v = (*((pack_value*)&pv)) << 2;
|
||||
pack_value v = pv << 2;
|
||||
v |= type_or;
|
||||
strm.write((const char*)&v, sizeof(pack_value));
|
||||
return sizeof(pack_value);
|
||||
|
|
Loading…
Reference in New Issue