epee: log type name when a container size check fails

This commit is contained in:
moneromooo-monero 2018-05-17 10:38:00 +01:00
parent 4b728d7dd4
commit 558d05b47e
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -156,7 +156,7 @@ namespace epee
typename stl_container::value_type* pelem = (typename stl_container::value_type*)buff.data();
CHECK_AND_ASSERT_MES(!(loaded_size%sizeof(typename stl_container::value_type)),
false,
"size in blob " << loaded_size << " not have not zero modulo for sizeof(value_type) = " << sizeof(typename stl_container::value_type));
"size in blob " << loaded_size << " not have not zero modulo for sizeof(value_type) = " << sizeof(typename stl_container::value_type) << ", type " << typeid(typename stl_container::value_type).name());
size_t count = (loaded_size/sizeof(typename stl_container::value_type));
for(size_t i = 0; i < count; i++)
container.insert(container.end(), *(pelem++));