Bugs found in 2012.1.214.2

2 posts, 0 answers
  1. Michael
    Michael avatar
    4 posts
    Member since:
    Jan 2012

    Posted 22 Feb 2012 Link to this post

    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);
  2. Yordan Dikov
    Yordan Dikov avatar
    69 posts

    Posted 27 Feb 2012 Link to this post

    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 >>
Back to Top