summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/displayapp/screens/SystemInfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp
index 69a0d1a0..3294ebe3 100644
--- a/src/displayapp/screens/SystemInfo.cpp
+++ b/src/displayapp/screens/SystemInfo.cpp
@@ -228,8 +228,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen4() {
auto nb = uxTaskGetSystemState(tasksStatus, maxTaskCount, nullptr);
std::sort(tasksStatus, tasksStatus + nb, sortById);
-
- for (uint8_t i = 0; i < nb; i++) {
+ for (uint8_t i = 0; i < nb && i < maxTaskCount; i++) {
lv_table_set_cell_value(infoTask, i + 1, 0, std::to_string(tasksStatus[i].xTaskNumber).c_str());
lv_table_set_cell_value(infoTask, i + 1, 1, tasksStatus[i].pcTaskName);