Skip to content

Commit

Permalink
Add InvariantCulture for operand to string conversion in Instruction.…
Browse files Browse the repository at this point in the history
…ToString()
  • Loading branch information
Fantoom committed Aug 12, 2022
1 parent 49b1c52 commit 0079fa6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Mono.Cecil.Cil/Instruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//

using System;
using System.Globalization;
using System.Text;

namespace Mono.Cecil.Cil {
Expand Down Expand Up @@ -122,11 +123,11 @@ public override string ToString ()
break;
case OperandType.InlineString:
instruction.Append ('\"');
instruction.Append (operand);
instruction.Append (Convert.ToString(operand, CultureInfo.InvariantCulture));
instruction.Append ('\"');
break;
default:
instruction.Append (operand);
instruction.Append (Convert.ToString(operand, CultureInfo.InvariantCulture));
break;
}

Expand Down

0 comments on commit 0079fa6

Please sign in to comment.