Fix undefined behavior in array overflow. The GCC 5.2 warning that
brought this to my attention was: src/nvtt/squish/simd_sse.h:90:28: warning: iteration 16u invokes undefined behavior [-Waggressive-loop-optimizations] m_v = _mm_add_ps( m_v, v.m_v ); src/nvtt/squish/fastclusterfit.cpp:146:22: note: containing loop for( int c0 = 0; c0 <= 16; c0++) and again for the loop on line 259. In the latter case this loop construct results in writes to m_unweighted[16] which is declated as "VecX m_unweighted[16]". I did not analyze the prior loop as carefully. I believe that this commit was what was intended, but I'm not certain.pull/231/head
parent
f55b7d438a
commit
ea2ac753b0
Loading…
Reference in New Issue