Index: branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1157)
+++ branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1159)
@@ -2177,9 +2177,5 @@
 #endif
     {
-#if NUM_OL_FLAGS
-      for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++)
-#else
-      for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++)
-#endif
+      for( j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++ )
       {
         WRITE_FLAG( vps->getOutputLayerFlag(i,j), "output_layer_flag[i][j]");
