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

Bug: Dots and Comas / Regional setting

6 Answers 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tedd
Top achievements
Rank 1
Tedd asked on 11 Nov 2011, 11:43 AM

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);

6 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 16 Nov 2011, 01:34 PM
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 >>

0
Michael
Top achievements
Rank 1
answered on 31 Jan 2012, 01:48 PM
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)
0
Tsviatko Yovtchev
Telerik team
answered on 06 Feb 2012, 05:57 PM
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 >>
0
Michael
Top achievements
Rank 1
answered on 20 Feb 2012, 02:08 PM
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.
0
Kaloyan
Telerik team
answered on 22 Feb 2012, 10:16 AM
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 >>
0
Michael
Top achievements
Rank 1
answered on 22 Feb 2012, 11:50 AM
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.
Tags
General Discussions
Asked by
Tedd
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Michael
Top achievements
Rank 1
Tsviatko Yovtchev
Telerik team
Share this question
or