storages: fix writing varints on big endian

This commit is contained in:
moneromooo-monero 2019-05-13 18:58:00 +00:00
parent bdda084651
commit 32c3834948
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 1 additions and 1 deletions

View File

@ -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);