Skip to content

Commit

Permalink
improve debug output to properly quote byte strings (#1088)
Browse files Browse the repository at this point in the history
  • Loading branch information
hudlow authored Dec 6, 2024
1 parent c096438 commit 6202a67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func formatLiteral(c ref.Val) string {
case types.Bool:
return fmt.Sprintf("%t", v)
case types.Bytes:
return fmt.Sprintf("b\"%s\"", string(v))
return fmt.Sprintf("b%s", strconv.Quote(string(v)))
case types.Double:
return fmt.Sprintf("%v", float64(v))
case types.Int:
Expand Down

0 comments on commit 6202a67

Please sign in to comment.