diff options
1 files changed, 4 insertions, 4 deletions
| -rw-r--r-- | src/ConsoleInterface/Toolbox.cpp | 8 |
diff --git a/src/ConsoleInterface/Toolbox.cpp b/src/ConsoleInterface/Toolbox.cpp index 31e5277..402711f 100644 --- a/src/ConsoleInterface/Toolbox.cpp +++ b/src/ConsoleInterface/Toolbox.cpp @@ -53,14 +53,14 @@ void __printTableLine(unsigned columns) { void table(unsigned startNumber, unsigned columns, const char* items) { __printTableColumnHeader(startNumber, columns); - for (unsigned i = 0, colInd = 0, rowCnt = startNumber; items[i] != '\0'; i++, (++colInd) %= columns) { + for (unsigned i = 0, colInd = 0, rowInd = 0; items[i] != '\0'; i++, (++colInd) %= columns) { if (colInd == 0) { + std::cout << "|" << std::endl; __printTableLine(columns); - __printTableHeaderNumber(rowCnt++); - continue; + __printTableHeaderNumber((rowInd++) + startNumber); } - std::cout << items[rowCnt * columns + colInd] << std::endl; + std::cout << "| " << items[rowInd * columns + colInd] << " "; } } |
