Skip to content

Commit

Permalink
fix: warning: 'sprintf' is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Apr 13, 2023
1 parent 104764c commit 490be91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vstgui/plugin-bindings/vst3editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,8 @@ void VST3Editor::onMouseEvent (MouseEvent& event, CFrame* frame)
int32_t zoomFactorTag = 0;
for (std::vector<double>::const_iterator it = allowedZoomFactors.begin (), end = allowedZoomFactors.end (); it != end; ++it, ++zoomFactorTag)
{
sprintf (zoomFactorString, "%d%%", static_cast<int>((*it) * 100));
snprintf (zoomFactorString, std::size (zoomFactorString), "%d%%",
static_cast<int> ((*it) * 100));
CMenuItem* item = zoomMenu->addEntry (new CCommandMenuItem (
{zoomFactorString, zoomFactorTag, this, "Zoom", zoomFactorString}));
if (zoomFactor == *it)
Expand Down

0 comments on commit 490be91

Please sign in to comment.