From f3d3126839d7c11893f6112b128e81ad130af336 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 27 Jun 2009 23:42:49 -0400 Subject: [PATCH] Bug Fix - Fixed bug that caused asserts in Table.cpp when a column had a blank heading and value. --- src/Table.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Table.cpp b/src/Table.cpp index ad0681926..9a9058150 100644 --- a/src/Table.cpp +++ b/src/Table.cpp @@ -117,11 +117,11 @@ void Table::setTableDashedUnderline () int Table::addColumn (const std::string& col) { mSpecifiedWidth.push_back (minimum); - mMaxDataWidth.push_back (col.length ()); + mMaxDataWidth.push_back (col == "" ? 1 : col.length ()); mCalculatedWidth.push_back (0); mColumnPadding.push_back (0); - mColumns.push_back (col); + mColumns.push_back (col == "" ? " " : col); return mColumns.size () - 1; }