Created
January 16, 2020 16:03
-
-
Save LemonBoy/adf5786e1742203d58c897756752a05a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/std/fmt.zig b/lib/std/fmt.zig | |
index 57fb3a407..1bb3ab611 100644 | |
--- a/lib/std/fmt.zig | |
+++ b/lib/std/fmt.zig | |
@@ -431,7 +431,7 @@ pub fn formatType( | |
}, | |
else => return format(context, Errors, output, "{}@{x}", .{ @typeName(T.Child), @ptrToInt(value) }), | |
}, | |
- .Many => { | |
+ .Many, .C => { | |
if (ptr_info.child == u8) { | |
if (fmt.len > 0 and fmt[0] == 's') { | |
const len = mem.len(u8, value); | |
@@ -449,9 +449,6 @@ pub fn formatType( | |
} | |
return format(context, Errors, output, "{}@{x}", .{ @typeName(ptr_info.child), @ptrToInt(value.ptr) }); | |
}, | |
- .C => { | |
- return format(context, Errors, output, "{}@{x}", .{ @typeName(T.Child), @ptrToInt(value) }); | |
- }, | |
}, | |
.Array => |info| { | |
const Slice = @Type(builtin.TypeInfo{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment