aboutsummaryrefslogtreecommitdiff
path: root/core/fmt/fmt.odin
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-10-02 20:59:49 +0100
committergingerBill <bill@gingerbill.org>2023-10-02 20:59:49 +0100
commit2cca00505601f0b0e76719d366a037cdb4cf794c (patch)
tree64268ab5ad8c54d5dbd594c1582584c4465a5827 /core/fmt/fmt.odin
parentd27109640e6c6d86419d2a419a2d5ec3a0cfd1d9 (diff)
parent1287e8c7349162e60e49234c36b952d14bc93a91 (diff)
Merge branch 'master' of https://github.com/odin-lang/Odindev-2023-10
Diffstat (limited to 'core/fmt/fmt.odin')
-rw-r--r--core/fmt/fmt.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin
index c2240c275..1f52fdea9 100644
--- a/core/fmt/fmt.odin
+++ b/core/fmt/fmt.odin
@@ -152,9 +152,9 @@ aprintln :: proc(args: ..any, sep := " ") -> string {
//
// Returns: A formatted string. The returned string must be freed accordingly.
//
-aprintf :: proc(fmt: string, args: ..any) -> string {
+aprintf :: proc(fmt: string, args: ..any, allocator := context.allocator) -> string {
str: strings.Builder
- strings.builder_init(&str)
+ strings.builder_init(&str, allocator)
sbprintf(&str, fmt, ..args)
return strings.to_string(str)
}