View Revisions: Issue #70

Summary 0000070: Wrong loop in P_SetRenderSector
Revision 2017-01-18 06:20 by Edward-san
Additional Information
Revision 2017-01-18 06:22 by Edward-san
Additional Information Noticed because GCC reported this in Release mode:


/home/edward-san/zdoom/gzdoom/trunk/src/p_glnodes.cpp: In function ‘void P_SetRenderSector()’:
/home/edward-san/zdoom/gzdoom/trunk/src/p_glnodes.cpp:1441:16: warning: assuming signed overflow does 
not occur when assuming that (X + c) >= X is always true [-Wstrict-overflow]
  for (i = 0; i < numsegs; i++)
              ~~^~~~~~~~~
Revision 2017-01-18 06:20 by Edward-san
Description In commit https://github.com/coelckers/gzdoom/commit/b9ac44e8f21a8c751b53aad7f41a44045e9bdc9e , the structure of the loop in P_SetRenderSector got changed, but one inner loop kept the same counter variable as the outer loop, leading to the outer loop to terminate unexpectedly.

Could this have something to do with all the crashes which happened recently?
Revision 2017-01-18 06:26 by Edward-san
Description In commit https://github.com/coelckers/gzdoom/commit/b9ac44e8f21a8c751b53aad7f41a44045e9bdc9e , the structure of the loop in P_SetRenderSector got changed, but one inner loop kept the same counter variable as the outer loop, leading to the outer loop to terminate unexpectedly early.

Could this have something to do with all the crashes which happened recently?