Formatting option "%h" now supports pointers.

This commit is contained in:
Christoffer Lerno
2025-07-08 11:43:49 +02:00
parent a2122e0153
commit 26d5cc694a
5 changed files with 23 additions and 3 deletions

View File

@@ -495,6 +495,11 @@ fn usz? Formatter.vprintf(&self, String format, any[] anys)
out = ((char*)current.ptr)[:current.type.sizeof];
break;
}
if (current.type.kindof == POINTER)
{
out = ((*(char**)current.ptr))[:current.type.inner.sizeof];
break;
}
total_len += self.out_substr("<INVALID>")!;
continue;
}