Fixed extra junk after ms string with bufPrintZ
This commit is contained in:
+1
-1
@@ -107,7 +107,7 @@ pub fn main() !void {
|
||||
var buf: [8]u8 = undefined;
|
||||
const timer_ms = timer.getTicks();
|
||||
// const timer_base = std.math.log10(timer_ms) + 3;
|
||||
const time_str: []const u8 = try std.fmt.bufPrint(&buf, "{d}ms", .{timer_ms});
|
||||
const time_str: [*:0]const u8 = try std.fmt.bufPrintZ(&buf, "{d}ms", .{timer_ms});
|
||||
var time_text = try GameText.loadFromRenderedText(time_str, RGBAColor.whiteSmoke().tosdl());
|
||||
try time_text.render(
|
||||
&game_state,
|
||||
|
||||
Reference in New Issue
Block a user