summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util/TextTable.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/TextTable.cpp b/src/util/TextTable.cpp
index 618f7b7b..53014aa4 100644
--- a/src/util/TextTable.cpp
+++ b/src/util/TextTable.cpp
@@ -32,6 +32,7 @@ TextTable::add_heading(const std::string& text)
Cell cell(text);
cell.m_heading = true;
m_rows.push_back({cell});
+ m_columns = std::max(m_columns, size_t(1));
}
void
@@ -86,6 +87,8 @@ TextTable::render() const
std::string result;
for (const auto& row : m_rows) {
+ ASSERT(column_widths.size() >= row.size());
+
std::string r;
bool first = true;
for (size_t i = 0; i < row.size(); ++i) {