aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/storages
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-13 18:58:00 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-09-04 14:53:57 +0000
commit32c38349483dbe7f0fdd83aa77215aac381b219d (patch)
tree2827294884247c86b0f519a43fa6da322b793a48 /contrib/epee/include/storages
parentepee: fix local/loopback checks on big endian (diff)
downloadmonero-32c38349483dbe7f0fdd83aa77215aac381b219d.tar.xz
storages: fix writing varints on big endian
Diffstat (limited to 'contrib/epee/include/storages')
-rw-r--r--contrib/epee/include/storages/portable_storage_to_bin.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/epee/include/storages/portable_storage_to_bin.h b/contrib/epee/include/storages/portable_storage_to_bin.h
index 9501bbc2a..de191c236 100644
--- a/contrib/epee/include/storages/portable_storage_to_bin.h
+++ b/contrib/epee/include/storages/portable_storage_to_bin.h
@@ -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);