Fix infinite loop in indexMirror. Fixes issue 65.
This commit is contained in:
parent
d938e2d753
commit
bdebc937be
|
@ -1,6 +1,7 @@
|
||||||
NVIDIA Texture Tools version 2.0.4
|
NVIDIA Texture Tools version 2.0.4
|
||||||
* Fix error in RGB format output; reported by jonsoh. See issue 49.
|
* Fix error in RGB format output; reported by jonsoh. See issue 49.
|
||||||
* Added support RGB format dithering by jonsoh. Fixes issue 50 and 51.
|
* Added support RGB format dithering by jonsoh. Fixes issue 50 and 51.
|
||||||
|
* Prevent infinite loop in indexMirror when width equal 1. Fixes issue 65.
|
||||||
|
|
||||||
NVIDIA Texture Tools version 2.0.3
|
NVIDIA Texture Tools version 2.0.3
|
||||||
* More accurate DXT3 compressor. Fixes issue 38.
|
* More accurate DXT3 compressor. Fixes issue 38.
|
||||||
|
|
|
@ -226,11 +226,15 @@ inline uint FloatImage::indexRepeat(int x, int y) const
|
||||||
|
|
||||||
inline uint FloatImage::indexMirror(int x, int y) const
|
inline uint FloatImage::indexMirror(int x, int y) const
|
||||||
{
|
{
|
||||||
|
if (m_width == 1) x = 0;
|
||||||
|
|
||||||
x = abs(x);
|
x = abs(x);
|
||||||
while (x >= m_width) {
|
while (x >= m_width) {
|
||||||
x = abs(m_width + m_width - x - 2);
|
x = abs(m_width + m_width - x - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_height == 1) y = 0;
|
||||||
|
|
||||||
y = abs(y);
|
y = abs(y);
|
||||||
while (y >= m_height) {
|
while (y >= m_height) {
|
||||||
y = abs(m_height + m_height - y - 2);
|
y = abs(m_height + m_height - y - 2);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user