This is a migrated thread and some comments may be shown as answers.

Bugs found in 2012.1.214.2

1 Answer 43 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 22 Feb 2012, 03:11 PM
I tried to decompile the game Terraria and the following problems showed up in the decompiled code.

JustDecompile produces this:
Vector2* vector2Pointer2 = &vector2;
(*(vector2Pointer2)).X = vector2Pointer2.X + x2 * 3f;
Vector2* y3 = &vector2;
(*(y3)).Y = y3.Y + y2 * 3f;

where the correct code would look like:
Vector2 vector2Pointer2 = vector2;
vector2Pointer2.X = vector2Pointer2.X + x2 * 3f;
Vector2 y3 = vector2;
y3.Y = y3.Y + y2 * 3f;

The produced code will not compile out-of-the-box, because it would need to be in an "unsafe { }" block. It also does not really make sense at all to use unsafe pointers in this case.

The other bug I found was, in some cases code like this was generated:
Vector2 vector212.X = (float)(r * 16);
vector212.Y = (float)(s * 16);

this also won't compile, it should be like this:
Vector2 vector212;
vector212.X = (float)(r * 16);
vector212.Y = (float)(s * 16);

1 Answer, 1 is accepted

Sort by
0
Yordan Dikov
Telerik team
answered on 27 Feb 2012, 10:52 AM
Hi Michael,

 Thank you for getting in touch with us. We are aware of both the problems and we're looking into ways to improve our performance in this cases. Stay tuned for updates, and don't hesitate to contact us with any other issues you stumble upon in JustDecompile.

Kind regards,
Yordan Dikov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Yordan Dikov
Telerik team
Share this question
or