From 2f3685be6a10fbed119fea86246c77742a0d3369 Mon Sep 17 00:00:00 2001 From: somebody_master Date: Wed, 12 May 2021 11:32:58 +0200 Subject: [PATCH] Corregir mostrarVentana en ui Signed-off-by: somebody_master --- src/ui.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ui.cpp b/src/ui.cpp index 7e484eb..749a016 100755 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -148,9 +148,10 @@ void ui::mostrarVentana(WINDOW *ventana, std::vector *texto, attron(A_BOLD); box(ventana, 0, 0); mvwprintw(ventana, 0, 1, tituloVentana->c_str()); - for (uint8_t i = 1; i < *sectores + 1; i++) { - for (uint8_t j = 0; j < texto->size(); j++) { - mvwprintw(ventana, j + 1, *ancho - *ancho / i + 1, texto->at(j).c_str()); + for (uint8_t i = 0; i < *sectores; i++) { + for (uint8_t j = 0; j < texto->size() / *sectores; j++) { + mvwprintw(ventana, j + 1, *ancho * i + 1, + texto->at(j + texto->size() / *sectores * (i)).c_str()); } } attroff(A_BOLD);