Skip to content

Commit

Permalink
Update MainService.Tools.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhitong committed May 14, 2024
1 parent 6fdab35 commit 17141e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Neo.CLI/CLI/MainService.Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,10 @@ private string ScriptsToOpCode(Script script)
if (!instruction.Operand.IsEmpty && instruction.Operand.Length > 0)
{
var operand = instruction.Operand.ToArray();
var asicii = Encoding.Default.GetString(operand);
asicii = asicii.Any(p => p < '0' || p > 'z') ? operand.ToHexString() : asicii;
var ascii = Encoding.Default.GetString(operand);
ascii = ascii.Any(p => p < '0' || p > 'z') ? operand.ToHexString() : ascii;

result.Add($"{op} {(operand.Length == 20 ? new UInt160(operand).ToString() : asicii)}");
result.Add($"{op} {(operand.Length == 20 ? new UInt160(operand).ToString() : ascii)}");
}
else
{
Expand Down

0 comments on commit 17141e4

Please sign in to comment.