From 979e96a342c9bebe9fb0b78850aa61940767af19 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 22 Sep 2023 14:41:28 -0600 Subject: [PATCH] fix a char[] scope issue reported by ASAN --- gtk2_ardour/editor_actions.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 9091901805..0fbdecc2cf 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -1170,13 +1170,13 @@ Editor::edit_current_tempo () RefPtr Editor::draw_velocity_action (int v) { + char buf[64]; const char* action = 0; RefPtr act; if (v==DRAW_VEL_AUTO) { action = "draw-velocity-auto"; } else if (v>=1 && v<=127) { - char buf[64]; sprintf(buf, X_("draw-velocity-%d"), v); //we don't allow drawing a velocity 0; some synths use that as note-off action = buf; }