| ... | ... | @@ -504,7 +504,9 @@ pub fn formatType( |
| 504 | 504 | .One => switch (@typeInfo(ptr_info.child)) { |
| 505 | 505 | .Array => |info| { |
| 506 | 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 | 511 | return format(writer, "{s}@{x}", .{ @typeName(ptr_info.child), @ptrToInt(value) }); |
| 510 | 512 | }, |
| ... | ... | @@ -529,7 +531,7 @@ pub fn formatType( |
| 529 | 531 | return writer.writeAll("{ ... }"); |
| 530 | 532 | } |
| 531 | 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 | 535 | return formatText(value, fmt, options, writer); |
| 534 | 536 | } |
| 535 | 537 | } |