Plotline with stride parameter caused index out of bound exception.
- Dominant language
- C++
- Stars
- 6.2k
- Forks
- 693
- PR merge metrics
- No merged PRs in 30d
Description
Issue code is here in _**implot_internal.h**_:
``` cpp
template
inline T OffsetAndStride(const T* data, int idx, int count, int offset, int stride) {
idx = ImPosMod(offset + idx, count);
return *(const T*)(const void*)((const unsigned char*)data + (size_t)idx * stride); // this line
}
```
I tried to debug the reason of this issue and found that some times the idx * stride is more bigger than count * sizeof(T).
Tried one fix but not worked, plotted line will at a mess when set to idx to max size when it is too big.
Should have deeper reason for this.
Hope some one will fix this some time, and I just stride data before we start plot to avoid this.
Thank you.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.