diff options
Diffstat (limited to 'lib/nes/app/graphics')
| -rw-r--r-- | lib/nes/app/graphics/renderer.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/nes/app/graphics/renderer.hh b/lib/nes/app/graphics/renderer.hh index 5b9ec48..cfc1889 100644 --- a/lib/nes/app/graphics/renderer.hh +++ b/lib/nes/app/graphics/renderer.hh @@ -56,10 +56,10 @@ namespace nes::app i32 const x, i32 const y, color const c, text_attributes const attrs, std::string_view const fmt, Args... args) -> u32 { - char buffer[width]; - auto const str = string_builder{ buffer, sizeof(buffer) }.append_format(fmt, args...).get_result(); - render_text(x, y, str, c, attrs); - return static_cast<u32>(str.length()); + string_buffer<width> buffer{}; + buffer.append_format(fmt, args...); + render_text(x, y, buffer.get_result(), c, attrs); + return static_cast<u32>(buffer.get_result().length()); } template<typename... Args> |
