biddyweb / androguard

Automatically exported from code.google.com/p/androguard
Apache License 2.0
0 stars 0 forks source link

Boolean compares are decompiled as integer compare #125

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Have a SMALI Code that looks like this:
    const-string v22, "foobar"
    move-object/from16 v0, v22
    invoke-virtual {v4, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    move-result v22
    if-eqz v22, :cond_3a

will result in a java code decompiled by dad like:
    if(v4.equals("foobar") == 0){

which isnt that wrong because basicly boolean operations are integer operations 
in dalvik, but it's not valid in the java domain.

What is the expected output? What do you see instead?

boolean operations should end up in something like
   if(v4.equals("foobar"))

What version of the product are you using? On what operating system?
changeset:   460:1e64755cd512

Original issue reported on code.google.com by 5hp...@gmail.com on 25 Jun 2013 at 10:37