Explorar o código

Fixed warning: operation on ‘currentDirection’ may be undefined.

bkaradzic %!s(int64=12) %!d(string=hai) anos
pai
achega
35aa2d75c7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/14-shadowvolumes/shadowvolumes.cpp

+ 1 - 1
examples/14-shadowvolumes/shadowvolumes.cpp

@@ -2443,7 +2443,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
 				++stateStep;
 				++stateStep;
 				if (stateStep >= ( (stateChange & ~0x1) >> 1) )
 				if (stateStep >= ( (stateChange & ~0x1) >> 1) )
 				{
 				{
-					currentDirection = (++currentDirection) & directionMask;
+					currentDirection = (currentDirection + 1) & directionMask;
 					stateStep = 0;
 					stateStep = 0;
 					++stateChange;
 					++stateChange;
 				}
 				}