From 53598b8c40ce479b3df512b84e7b4c04a669b371 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Mon, 4 Sep 2023 22:30:35 +0200 Subject: [PATCH] Make ZString print natively with %s. --- lib/std/io/formatter.c3 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/std/io/formatter.c3 b/lib/std/io/formatter.c3 index ec4175101..d0273fa58 100644 --- a/lib/std/io/formatter.c3 +++ b/lib/std/io/formatter.c3 @@ -153,6 +153,10 @@ fn usz! Formatter.out_str(&self, any arg) @private case FUNC: return self.out_substr(""); case DISTINCT: + if (arg.type == ZString.typeid) + { + return self.out_substr(((ZString*)arg).as_str()); + } if (arg.type == DString.typeid) { return self.out_substr(((DString*)arg).as_str());