From ea9ca9034702c6d6e74a42f02bdbb7bc48044099 Mon Sep 17 00:00:00 2001 From: whh8b <whh8b@git.zephyr-software.com> Date: Mon, 14 Dec 2015 05:19:47 +0000 Subject: [PATCH] Don't use overloaded == to compare dollop entries in Split() Also, fix a small initializer bug in Dollop_t constructor --- src/dollop.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dollop.cpp b/src/dollop.cpp index 63cff189b..b87ae33a5 100644 --- a/src/dollop.cpp +++ b/src/dollop.cpp @@ -7,7 +7,8 @@ namespace Zipr_SDK { Dollop_t::Dollop_t(Instruction_t *start) { Instruction_t *loop = NULL; - m_size = CalculateWorstCaseSize(); + + m_size = 0; if (start == NULL) return; @@ -16,6 +17,8 @@ namespace Zipr_SDK { do { push_back(new DollopEntry_t(loop)); } while (NULL != (loop = loop->GetFallthrough())); + + m_size = CalculateWorstCaseSize(); } size_t Dollop_t::CalculateWorstCaseSize() @@ -62,7 +65,7 @@ namespace Zipr_SDK { std::cout << "Checking " << std::hex << query.Instruction() << " ?= " << std::hex << p->Instruction() << "." << std::endl; - return query == *p; + return query.Instruction() == p->Instruction(); }); /* * No matching split point. Just return NULL. -- GitLab