| ... | @@ -504,7 +504,9 @@ pub fn formatType( | ... | @@ -504,7 +504,9 @@ pub fn formatType( |
| 504 | .One => switch (@typeInfo(ptr_info.child)) { | 504 | .One => switch (@typeInfo(ptr_info.child)) { |
| 505 | .Array => |info| { | 505 | .Array => |info| { |
| 506 | if (info.child == u8) { | 506 | if (info.child == u8) { |
| 507 | return formatText(value, fmt, options, writer); | 507 | if (fmt.len > 0 and comptime mem.indexOfScalar(u8, "sxXeEzZ", fmt[0]) != null) { |
| | 508 | return formatText(value, fmt, options, writer); |
| | 509 | } |
| 508 | } | 510 | } |
| 509 | return format(writer, "{s}@{x}", .{ @typeName(ptr_info.child), @ptrToInt(value) }); | 511 | return format(writer, "{s}@{x}", .{ @typeName(ptr_info.child), @ptrToInt(value) }); |
| 510 | }, | 512 | }, |
| ... | @@ -529,7 +531,7 @@ pub fn formatType( | ... | @@ -529,7 +531,7 @@ pub fn formatType( |
| 529 | return writer.writeAll("{ ... }"); | 531 | return writer.writeAll("{ ... }"); |
| 530 | } | 532 | } |
| 531 | if (ptr_info.child == u8) { | 533 | if (ptr_info.child == u8) { |
| 532 | if (fmt.len == 0 or comptime mem.indexOfScalar(u8, "sxXeEzZ", fmt[0]) != null) { | 534 | if (fmt.len > 0 and comptime mem.indexOfScalar(u8, "sxXeEzZ", fmt[0]) != null) { |
| 533 | return formatText(value, fmt, options, writer); | 535 | return formatText(value, fmt, options, writer); |
| 534 | } | 536 | } |
| 535 | } | 537 | } |