[Build/MacOS] Fix sprintf deprecation warnings

Convert to snprintf in trace_viewer and suppress in 3pp stb header.
This commit is contained in:
Herman S.
2026-03-27 00:10:39 +09:00
parent 5f04b5420d
commit 1af96481b2
2 changed files with 9 additions and 2 deletions

View File

@@ -1763,8 +1763,8 @@ void TraceViewer::DrawStateUI() {
regs.GetVertexFetch(vertex_binding.fetch_constant);
assert_true(fetch.endian == xenos::Endian::k8in32);
char tree_root_id[32];
sprintf(tree_root_id, "#vertices_root_%d",
vertex_binding.fetch_constant);
snprintf(tree_root_id, sizeof(tree_root_id), "#vertices_root_%d",
vertex_binding.fetch_constant);
if (ImGui::TreeNode(tree_root_id, "vf%d: 0x%.8X (%db), %s",
vertex_binding.fetch_constant, fetch.address << 2,
fetch.size * 4,