From dd2d9ce032a06638e57e934497f64dc1984ddc81 Mon Sep 17 00:00:00 2001 From: Evan Pezent Date: Tue, 2 Mar 2021 21:43:45 -0600 Subject: [PATCH] fix buffer overflow --- implot_demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/implot_demo.cpp b/implot_demo.cpp index f645036..b1a316e 100644 --- a/implot_demo.cpp +++ b/implot_demo.cpp @@ -1043,7 +1043,7 @@ void ShowDemoWindow(bool* p_open) { if (dnd[k].Plt == 1 && dnd[k].Data.size() > 0) { ImPlot::SetPlotYAxis(dnd[k].Yax); ImPlot::SetNextLineStyle(dnd[k].Color); - static char label[16]; + static char label[32]; sprintf(label,"%s (Y%d)", dnd[k].Label, dnd[k].Yax+1); ImPlot::PlotLine(label, &dnd[k].Data[0].x, &dnd[k].Data[0].y, dnd[k].Data.size(), 0, 2 * sizeof(float)); // allow legend item labels to be DND sources