fix CCString: clear buffer after use in sprintf
Some checks failed
format / format (push) Has been cancelled
Build and Test / build (push) Has been cancelled

fix #487
This commit is contained in:
Simon Cruanes 2026-03-02 17:36:31 -05:00
parent 08e8fd3d54
commit aba4c79625

View file

@ -398,7 +398,10 @@ let sprintf_ c format =
Format.kfprintf
(fun _fmt ->
Format.pp_print_flush fmt ();
Buffer.contents buf)
let s = Buffer.contents buf in
Buffer.reset buf;
(* in case of reuse *)
s)
fmt format
let with_color_ksf ~f s fmt =