mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-20 14:41:09 +00:00
Use fmt.caprintf directly
This commit is contained in:
3
vendor/raylib/raylib.odin
vendored
3
vendor/raylib/raylib.odin
vendored
@@ -1684,8 +1684,7 @@ TextFormat :: proc(text: cstring, args: ..any) -> cstring {
|
||||
|
||||
// Text formatting with variables (sprintf style) and allocates (must be freed with 'MemFree')
|
||||
TextFormatAlloc :: proc(text: cstring, args: ..any) -> cstring {
|
||||
str := fmt.tprintf(string(text), ..args)
|
||||
return strings.clone_to_cstring(str, MemAllocator())
|
||||
return fmt.caprintf(string(text), ..args, allocator=MemAllocator())
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user