[Fb-contrib-commit] SF.net SVN: fb-contrib:[1464] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2010-01-10 17:39:57
|
Revision: 1464
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1464&view=rev
Author: dbrosius
Date: 2010-01-10 17:39:51 +0000 (Sun, 10 Jan 2010)
Log Message:
-----------
fix branching guard checks
Modified Paths:
--------------
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PoorlyDefinedParameter.java
Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PoorlyDefinedParameter.java
===================================================================
--- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PoorlyDefinedParameter.java 2010-01-10 17:33:17 UTC (rev 1463)
+++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PoorlyDefinedParameter.java 2010-01-10 17:39:51 UTC (rev 1464)
@@ -169,14 +169,20 @@
state = State.SAW_NOTHING;
break;
}
- if (downwardBranchTarget == -1) {
+
+ {
+ int insTarget = -1;
if ((seen >= IFEQ) && (seen <= IF_ACMPNE)) {
- downwardBranchTarget = getBranchTarget();
- if (downwardBranchTarget < getPC())
- downwardBranchTarget = -1;
+ insTarget = getBranchTarget();
+ if (insTarget < getPC())
+ insTarget = -1;
} else if ((seen == LOOKUPSWITCH) || (seen == TABLESWITCH)) {
- downwardBranchTarget = this.getDefaultSwitchOffset() + getPC();
+ insTarget = this.getDefaultSwitchOffset() + getPC();
}
+
+ if (insTarget > downwardBranchTarget) {
+ downwardBranchTarget = insTarget;
+ }
}
} else {
state = State.SAW_NOTHING;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|