Browse Source

Use `fmt.caprintf` directly

gingerBill 11 months ago
parent
commit
19b95349a6
1 changed files with 1 additions and 2 deletions
  1. 1 2
      vendor/raylib/raylib.odin

+ 1 - 2
vendor/raylib/raylib.odin

@@ -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())
 }