From 4fcc6e01aca406ef17d5a2dabdcbc9e1bd962c0d Mon Sep 17 00:00:00 2001 From: Evan Pezent Date: Thu, 2 Dec 2021 20:54:54 -0800 Subject: [PATCH] fix sizeof(T) in IndexData --- implot_items.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/implot_items.cpp b/implot_items.cpp index 0209238..802bde8 100644 --- a/implot_items.cpp +++ b/implot_items.cpp @@ -293,7 +293,7 @@ void EndItem() { // Offsets and strides a data buffer template IMPLOT_INLINE T IndexData(const T* data, int idx, int count, int offset, int stride) { - const int s = ((offset == 0) << 0) | ((stride == sizeof(float)) << 1); + const int s = ((offset == 0) << 0) | ((stride == sizeof(T)) << 1); switch (s) { case 3 : return data[idx]; case 2 : return data[(offset + idx) % count];