diff --git a/src/apps/debuganalyzer/model/ThreadModel.cpp b/src/apps/debuganalyzer/model/ThreadModel.cpp index f8517b2a3e..28eb3af122 100644 --- a/src/apps/debuganalyzer/model/ThreadModel.cpp +++ b/src/apps/debuganalyzer/model/ThreadModel.cpp @@ -101,7 +101,7 @@ ThreadModel::FindSchedulingEvent(bigtime_t time) time += fModel->BaseTime(); int32 lower = 0; - int32 upper = CountSchedulingEvents(); + int32 upper = CountSchedulingEvents() - 1; while (lower < upper) { int32 mid = (lower + upper) / 2;