Skip to content

Commit 30057a1

Browse files
committed
Linux fix
1 parent f91d945 commit 30057a1

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

plugins/src/objects/dyn_object.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,19 @@ bool dyn_object::operator_eq_tagged(const dyn_object &obj, bool &result) const
720720
if(!tag->inherits_from(tag_traits<TagType>::tag_uid)) return false;
721721
typedef tag_traits<TagType> tag;
722722

723-
result = std::equal(begin(), end(), obj.begin(), obj.end(), [](cell v1, cell v2)
723+
const cell *begin1 = begin();
724+
const cell *end1 = end();
725+
const cell *begin2 = obj.begin();
726+
const cell *end2 = obj.end();
727+
if(end2 - begin2 != end1 - begin1)
724728
{
725-
return *tag::conv_to(v1) == *tag::conv_to(v2);
726-
});
729+
result = false;
730+
}else{
731+
result = std::equal(begin(), end(), obj.begin(), [](cell v1, cell v2)
732+
{
733+
return *tag::conv_to(v1) == *tag::conv_to(v2);
734+
});
735+
}
727736
return true;
728737
}
729738

0 commit comments

Comments
 (0)