Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void idSurface_Polytope::FromPlanes(....)
- {
- ...
- for ( j = 0; j < w.GetNumPoints(); j++ ) {
- for ( k = 0; k < verts.Num(); j++ ) {
- if ( verts[k].xyz.Compare(w[j].ToVec3(),
- POLYTOPE_VERTEX_EPSILON ) ) {
- break;
- }
- }
- ...
- }
- ...
- }
- This is what should have been written here: for ( k = 0; k < verts.Num(); k++ ).
- This suspicious code was found in Doom3 project by PVS-Studio static code analyzer.
- Warning message is:
- V533 It is likely that a wrong variable is being incremented inside the 'for' operator. Consider reviewing 'j'. idLib surface_polytope.cpp 65
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement