From 4edb1c75b6aed12f12ee59394d7b4a74d8d2b9b0 Mon Sep 17 00:00:00 2001 From: Evan Pezent Date: Sun, 6 Jun 2021 17:42:00 -0700 Subject: [PATCH] fix GetColormapSize --- implot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/implot.cpp b/implot.cpp index dca83d9..8505acf 100644 --- a/implot.cpp +++ b/implot.cpp @@ -3389,7 +3389,7 @@ int GetColormapSize(ImPlotColormap cmap) { ImPlotContext& gp = *GImPlot; cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap; IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!"); - return gp.ColormapData.GetKeyCount(gp.Style.Colormap); + return gp.ColormapData.GetKeyCount(cmap); } ImU32 GetColormapColorU32(int idx, ImPlotColormap cmap) {