Bug: Dots and Comas / Regional setting

7 posts, 0 answers
  1. Tedd
    Tedd avatar
    2 posts
    Member since:
    Feb 2008

    Posted 11 Nov 2011 Link to this post

    System locale is used when decompiling. This gives interesting results when decompiling decimal/double/float numbers.

    In my Norwegian regional setup decimal delimiter is coma. In US setup decimal delimiter is dot. C# expects dot. This means this works fine on an US PC, not on for example a Norwegian PC.

    Some examples:

    if (r.RT60 < 0,58) { order = 1; } else { if (r.RT60 >= 0,58 && r.RT60 < 1,3)
    Room r= new Room(30, 30, 10, 0,2, 0,01, 0,1, 0,01, 0,05, 0,1);
  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 16 Nov 2011 Link to this post

    Hello Tedd,

    Thanks for reporting the problem. We will fix it in the next product update. 

    All the best,
    Kaloyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Michael
    Michael avatar
    4 posts
    Member since:
    Jan 2012

    Posted 31 Jan 2012 Link to this post

    This problem still occurs in some places using the latest version of JustDecompile (2012.1.106.0)

    this.velocity.X = this.velocity.X * 0,93;

    while in other places (in the same method) it works perfectly fine

    if ((double)this.velocity.X > -0.1 && (double)this.velocity.X < 0.1)
  5. Tsviatko Yovtchev
    Admin
    Tsviatko Yovtchev avatar
    408 posts

    Posted 06 Feb 2012 Link to this post

    Hi Michael,

     That's a fairly weird problem. Could you send over a sample assembly that demonstrates it? Rather unfortunately we have not been able to reproduce it locally.

    Regards,
    Tsviatko Yovtchev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Michael
    Michael avatar
    4 posts
    Member since:
    Jan 2012

    Posted 20 Feb 2012 Link to this post

    Sorry for the late reply. I tried to decompile the game "Terraria", because it's probably the best test case for MSIL decompilers. In my experience decompiling it crashes Reflector and generates wrong code in ILSpy. So I used it as a test case to compare JustDecompile with the other existing MSIL decompilers.
  7. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 22 Feb 2012 Link to this post

    Hello,

     Thanks once again for the pointed issues you have discovered so far. We have logged most of them and we will appreciate if you continue sending as suggestions or issues you have encountered.

    Kind regards,
    Kaloyan
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. Michael
    Michael avatar
    4 posts
    Member since:
    Jan 2012

    Posted 22 Feb 2012 Link to this post

    In the latest version, 2012.1.214.2 the number formats seem to be correct now. I have encountered two other problems while trying to decompile Terraria and I'll open a separate thread to report them, because they are unrelated to this thread.
Back to Top
DevCraft banner