mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Merge pull request #1379 from tgschultz/patch-1
fixed handling of [*]u8 when no format specifier is set
This commit is contained in:
commit
4c95b2f9d1
@ -179,7 +179,7 @@ pub fn formatType(
|
||||
},
|
||||
builtin.TypeInfo.Pointer.Size.Many => {
|
||||
if (ptr_info.child == u8) {
|
||||
if (fmt[0] == 's') {
|
||||
if (fmt.len > 0 and fmt[0] == 's') {
|
||||
const len = std.cstr.len(value);
|
||||
return formatText(value[0..len], fmt, context, Errors, output);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user