Closed Janmm14 closed 4 years ago
Thanks for the report. I'll take a look tonight.
Ok should be fixed now. Thanks for finding this.
P.S. I added a simple heuristic for transforming while loops into for loops. It only handles simple cases and it doesn't include the initializer, but I figured it would be better than nothing. Please try it out and tell me what you think.
I came across a method where Krakatau is putting out slightly wrong code. Here is the Krakatau disassemble of it (in a clean, new class): https://gist.github.com/Janmm14/8deb94d88082d21e591b24a49d6988c8
Krakatau is adding boolean casts before the array accesses at the xor stuff during decompilation:
These boolean casts have to be removed and not replaced with someting like
== 0 ? 0 : 1
to match the behaviour of the source code. Krakatau doesn't know that char can be xor'd I think.For your convenience, the assembled class in a zip (no main method included): Stuff.zip