1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-10 06:01:52 +00:00

kvdb: fix iterator access issue

This commit is contained in:
Michael Scire 2019-07-18 20:34:15 -07:00
parent 32a90334bb
commit d95e20952c

View file

@ -21,7 +21,6 @@
#include "kvdb_auto_buffer.hpp" #include "kvdb_auto_buffer.hpp"
#include "kvdb_archive.hpp" #include "kvdb_archive.hpp"
#include "kvdb_bounded_string.hpp" #include "kvdb_bounded_string.hpp"
#include "kvdb_memory_key_value_store.hpp"
namespace sts::kvdb { namespace sts::kvdb {
@ -405,8 +404,8 @@ namespace sts::kvdb {
return ResultKvdbKeyNotFound; return ResultKvdbKeyNotFound;
} }
size_t size = std::min(max_out_size, it.GetValueSize()); size_t size = std::min(max_out_size, it->GetValueSize());
std::memcpy(out_value, it.GetValuePointer(), size); std::memcpy(out_value, it->GetValuePointer(), size);
*out_size = size; *out_size = size;
return ResultSuccess; return ResultSuccess;
} }