Fixed a bug

git-svn-id: svn://svn.cc65.org/cc65/trunk@1242 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-04-17 18:52:03 +00:00
parent 3dcb7dba3b
commit 99de22ffe2

View File

@@ -500,8 +500,13 @@ unsigned OptJumpTarget (CodeSeg* S)
/* Get next entry */
E2 = CS_GetNextEntry (S, I);
/* Check if we have a jump or branch, and a matching label */
if (E2 && (E2->Info & OF_UBRA) != 0 && E2->JumpTo) {
/* Check if we have a jump or branch, and a matching label, which
* is not attached to the jump itself
*/
if (E2 != 0 &&
(E2->Info & OF_UBRA) != 0 &&
E2->JumpTo &&
E2->JumpTo->Owner != E2) {
/* Get the entry preceeding the branch target */
T1 = CS_GetPrevEntry (S, CS_GetEntryIndex (S, E2->JumpTo->Owner));