diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-01 16:43:57 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-01 16:43:57 +0000 |
commit | fe5ab2c4396aa3ceebfdba44922806060ce8b3eb (patch) | |
tree | 61c9624ebc39ff3eaf239a7b4bcadd9db606f24c | |
parent | Merge pull request #2863 (diff) | |
download | monero-fe5ab2c4396aa3ceebfdba44922806060ce8b3eb.tar.xz |
epee: fix kv_unserialize return value when a field is not found
-rw-r--r-- | contrib/epee/include/serialization/keyvalue_serialization_overloads.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/epee/include/serialization/keyvalue_serialization_overloads.h b/contrib/epee/include/serialization/keyvalue_serialization_overloads.h index a94ecacc5..2e020b136 100644 --- a/contrib/epee/include/serialization/keyvalue_serialization_overloads.h +++ b/contrib/epee/include/serialization/keyvalue_serialization_overloads.h @@ -73,7 +73,7 @@ namespace epee template<class serializible_type, class t_storage> static bool unserialize_t_obj(serializible_type& obj, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname) { - typename t_storage::hsection hchild_section = stg.open_section(pname, hparent_section, true); + typename t_storage::hsection hchild_section = stg.open_section(pname, hparent_section, false); if(!hchild_section) return false; return obj._load(stg, hchild_section); } @@ -90,7 +90,7 @@ namespace epee static bool unserialize_t_obj(enableable<serializible_type>& obj, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname) { obj.enabled = false; - typename t_storage::hsection hchild_section = stg.open_section(pname, hparent_section, true); + typename t_storage::hsection hchild_section = stg.open_section(pname, hparent_section, false); if(!hchild_section) return false; obj.enabled = true; return obj.v._load(stg, hchild_section); |