From 4a7877157251f995b686a95383ad507c7e5a3707 Mon Sep 17 00:00:00 2001
From: Jason Hiser <jdhiser@gmail.com>
Date: Thu, 20 Sep 2018 09:22:12 +0000
Subject: [PATCH] added sanity checkong that a memory operand is found

---
 unpin.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/unpin.cpp b/unpin.cpp
index ff6ee69..7920d48 100644
--- a/unpin.cpp
+++ b/unpin.cpp
@@ -449,6 +449,7 @@ void Unpin_t::DoUpdateForInstructions()
 				const auto the_arg_it=find_if(ALLOF(operands),[](const DecodedOperand_t& op){ return op.isMemory() && op.getString()!=""; });
 				DataScoop_t* wrt=dynamic_cast<DataScoop_t*>(reloc->GetWRT());
 				assert(wrt);
+				assert(the_arg_it!=operands.end());
 				const auto &the_arg=*the_arg_it;
 				virtual_offset_t rel_addr1=the_arg.getMemoryDisplacement(); // ->Memory.Displacement;
 				//virtual_offset_t rel_addr1=the_arg->Memory.Displacement;
-- 
GitLab