mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 21:03:28 +01:00
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>
|
template<class pack_value, class t_stream>
|
||||||
size_t pack_varint_t(t_stream& strm, uint8_t type_or, size_t& pv)
|
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;
|
v |= type_or;
|
||||||
strm.write((const char*)&v, sizeof(pack_value));
|
strm.write((const char*)&v, sizeof(pack_value));
|
||||||
return sizeof(pack_value);
|
return sizeof(pack_value);
|
||||||
|
Loading…
Reference in New Issue
Block a user