* jode/obfuscator/modules/ConstantAnalyzer.java.in (handleOpcode):

Added divide by zero checks for opc_irem and opc_lrem.


git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1313 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 24 years ago
parent d093988656
commit 736e9595d2
  1. 5
      jode/ChangeLog
  2. 4
      jode/jode/obfuscator/modules/ConstantAnalyzer.java.in

@ -1,3 +1,8 @@
2001-05-02 Jochen Hoenicke <jochen@gnu.org>
* jode/obfuscator/modules/ConstantAnalyzer.java.in (handleOpcode):
Added divide by zero checks for opc_irem and opc_lrem.
2001-04-10 Jochen Hoenicke <jochen@gnu.org>
* jode/decompiler/Main.java (usage): Reworked usage message.

@ -734,9 +734,9 @@ public class ConstantAnalyzer implements Opcodes, CodeAnalyzer {
boolean known = value1.value != ConstValue.VOLATILE
&& value2.value != ConstValue.VOLATILE;
if (known) {
if ((opcode == opc_idiv
if (((opcode == opc_idiv || opcode == opc_irem)
&& ((Integer)value2.value).intValue() == 0)
|| (opcode == opc_ldiv
|| ((opcode == opc_ldiv || opcode == opc_lrem)
&& ((Long)value2.value).longValue() == 0))
known = false;
}

Loading…
Cancel
Save