Skip to content

Commit f10e33c

Browse files
author
Martijn Otto
committed
Fix logic error in the array type
1 parent cf5def0 commit f10e33c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/array.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ class Array : public Field
8585
{
8686
// construct a shared pointer
8787
auto ptr = std::shared_ptr<Field>(value.clone());
88-
88+
8989
// should we overwrite an existing record?
90-
if (index <= _fields.size())
90+
if (index >= _fields.size())
9191
{
9292
// append index
9393
_fields.push_back(ptr);

0 commit comments

Comments
 (0)