Skip to content

Commit

Permalink
replace std::sprintf with std::snprintf (#34)
Browse files Browse the repository at this point in the history
Change-Id: If5d3f425bffb1a8e220b51f234fe4cb32a19f296
  • Loading branch information
oliverlee authored Sep 1, 2024
1 parent 306be7a commit bdac11a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test_param.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class parameterized_test
for (auto it = params_.begin(); it != params_.end(); ++it) {
// other options will alloc
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
std::sprintf(s.data(), "%zu", i++);
std::snprintf(s.data(), N, "%zu", i++);
test<derived_rope_type, style_type>{value_param_name(s.data())} = g[it];
}
}
Expand Down

0 comments on commit bdac11a

Please sign in to comment.