From 24856ea494f6b3a84bc3d3d313a57b1882181913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 22 May 2021 22:08:19 +0200 Subject: Add assert to break infinite loop in case of a bug. --- src/sample_selection.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sample_selection.cc b/src/sample_selection.cc index 1195703..31313bb 100644 --- a/src/sample_selection.cc +++ b/src/sample_selection.cc @@ -103,6 +103,8 @@ const Sample* SampleSelection::get(level_t level, std::size_t pos) { DEBUG(rand, "%d %d", (int)up_index, (int)down_index); + assert(down_index <= up_index); + std::size_t current_index; if (up_value_lb < down_value_lb) { -- cgit v1.2.3