diff --git a/shared/libebm/PartitionOneDimensionalBoosting.cpp b/shared/libebm/PartitionOneDimensionalBoosting.cpp index bfc0210cd..9817eaeff 100644 --- a/shared/libebm/PartitionOneDimensionalBoosting.cpp +++ b/shared/libebm/PartitionOneDimensionalBoosting.cpp @@ -350,6 +350,16 @@ static ErrorEbm Flatten(BoosterShell* const pBoosterShell, EBM_ASSERT(bNominal || pSplit == cSlices - 1 + pInnerTermUpdate->GetSplitPointer(iDimension)); +#ifndef NDEBUG + UIntSplit prevDebug = 0; + for(size_t iDebug = 0; iDebug < cSlices - 1; ++iDebug) { + UIntSplit curDebug = pInnerTermUpdate->GetSplitPointer(iDimension)[iDebug]; + EBM_ASSERT(prevDebug < curDebug); + prevDebug = curDebug; + } + EBM_ASSERT(prevDebug < cBins); +#endif + LOG_0(Trace_Verbose, "Exited Flatten"); return Error_None; }