From 83df0cb6f99d8f2cad595d7b9d54d59a69516069 Mon Sep 17 00:00:00 2001
From: whh8b <whh8b@git.zephyr-software.com>
Date: Wed, 16 Mar 2016 16:41:46 +0000
Subject: [PATCH] Fail into the dollop's fallthrough when necessary

When looking for a dollop entry's fallthrough, be
sure to fallback and look at the dollop's fallthrough
when the particular entry does not have one.
---
 src/zipr.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/zipr.cpp b/src/zipr.cpp
index c63f5328c..38a1fae40 100644
--- a/src/zipr.cpp
+++ b/src/zipr.cpp
@@ -2220,6 +2220,16 @@ RangeAddress_t ZiprImpl_t::PlopDollopEntryWithTarget(
 			DollopEntry_t *fallthrough_de = NULL;
 
 			fallthrough_de = entry->MemberOfDollop()->FallthroughDollopEntry(entry);
+
+			/*
+			 * This means that we have a fallthrough for this dollop entry
+			 * that is actually the fallthrough of the dollop! Wowser.
+			 * TODO: Before doing this, check to make sure that _entry_ 
+			 * is the last of the dollop. 
+			 */
+			if (!fallthrough_de)
+				fallthrough_de = entry->MemberOfDollop()->FallthroughDollop()->front();
+
 			assert(fallthrough_de && fallthrough_de->IsPlaced());
 
 			bytes[0]=insn->GetDataBits()[0];
-- 
GitLab