cecil icon indicating copy to clipboard operation
cecil copied to clipboard

InvariantCulture for operand to string conversion in Instruction.ToString()

Open Fantoom opened this issue 1 year ago • 1 comments

Instruction.ToString() uses the culture of the current thread, which can be problematic for converting doubles and floats to a string.

Fantoom avatar Aug 12 '22 21:08 Fantoom

For context: we're writing a C compiler using Cecil, and hit the issue while dumping the methods' IL code and comparing it in the compiler unit tests (one contributor had a locale that uses different number format, and broke the tests). So, I agree that these changes should be made.

ForNeVeR avatar Aug 16 '22 20:08 ForNeVeR

Looking good, thank you!

jbevain avatar Sep 29 '22 21:09 jbevain