Fix logic error in the array type
This commit is contained in:
parent
cf5def0e89
commit
f10e33c7c7
|
|
@ -85,9 +85,9 @@ public:
|
||||||
{
|
{
|
||||||
// construct a shared pointer
|
// construct a shared pointer
|
||||||
auto ptr = std::shared_ptr<Field>(value.clone());
|
auto ptr = std::shared_ptr<Field>(value.clone());
|
||||||
|
|
||||||
// should we overwrite an existing record?
|
// should we overwrite an existing record?
|
||||||
if (index <= _fields.size())
|
if (index >= _fields.size())
|
||||||
{
|
{
|
||||||
// append index
|
// append index
|
||||||
_fields.push_back(ptr);
|
_fields.push_back(ptr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue