terminfo: numeric comptime buffer only needs to be 10 bytes

This commit is contained in:
Mitchell Hashimoto
2023-09-27 14:35:22 -07:00
parent 28329761a7
commit 4724e0dcb4

View File

@ -86,7 +86,7 @@ pub fn xtgettcapMap(comptime self: Source) type {
.boolean => "",
.string => |v| v,
.numeric => |v| numeric: {
var buf: [1024]u8 = undefined;
var buf: [10]u8 = undefined;
const num_len = std.fmt.formatIntBuf(&buf, v, 10, .upper, .{});
break :numeric buf[0..num_len];
},