authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-08-14 14:38:20-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2018-08-14 14:38:20-04:00
log4c95b2f9d1c6fd020c484fef53f796448203fb12
tree40121670ba4c0ad573029ed678fda0415d0aaede
parent52471f6221c76f47b0661754511b3559e60fd801
parentfa955f0024bc1e63200f6c6e3d22cf88dc6a65a5
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #1379 from tgschultz/patch-1

fixed handling of [*]u8 when no format specifier is set

1 files changed, 1 insertions(+), 1 deletions(-)

std/fmt/index.zig+1-1
......@@ -179,7 +179,7 @@ pub fn formatType(
179179 },
180180 builtin.TypeInfo.Pointer.Size.Many => {
181181 if (ptr_info.child == u8) {
182 if (fmt[0] == 's') {
182 if (fmt.len > 0 and fmt[0] == 's') {
183183 const len = std.cstr.len(value);
184184 return formatText(value[0..len], fmt, context, Errors, output);
185185 }