ogre-pagedgeometry
ogre-pagedgeometry copied to clipboard
`Ogre::Image` debug assert from `ColorMap::_getColorMap_Billinear()`
Apparently the x < mWidth check fails because both values are 256.
Windows10, Visual Studio 2022, Debug build with OGRE 14.4.1
Stack and locals from ColorMap::_getColorMap_Billinear():
| Name | Value | Type | |
|---|---|---|---|
| mapHeight | 256 | unsigned int | |
| mapWidth | 256 | unsigned int | |
| x | 2994.44165 | float | |
| xIndex | 255 | unsigned int | |
| xIndexFloat | 255.025681 | float | |
| xRatio | 0.0256805420 | float | |
| xRatioInv | 0.974319458 | float | |
| z | 1624.06433 | float | |
| zIndex | 138 | unsigned int | |
| zIndexFloat | 138.086823 | float | |
| zRatio | 0.0868225098 | float | |
| zRatioInv | 0.913177490 | float |
the assert is right. This is a out of bounds access at the border. It should probably be clamped (std::min)