Skip to content
Snippets Groups Projects
Commit ea9ca903 authored by whh8b's avatar whh8b
Browse files

Don't use overloaded == to compare dollop entries in Split()

Also, fix a small initializer bug in Dollop_t constructor
parent a83b4e65
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment