From d11ceade1a183a6a6095900456df4620473bbb4d Mon Sep 17 00:00:00 2001 From: diman Date: Sun, 7 Jan 2007 23:21:56 +0000 Subject: [PATCH] fixed wrong alignment of nmap output table when using --iflist --- NmapOutputTable.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/NmapOutputTable.cc b/NmapOutputTable.cc index 4ab244491..9bdb7aa16 100644 --- a/NmapOutputTable.cc +++ b/NmapOutputTable.cc @@ -147,10 +147,11 @@ void NmapOutputTable::addItem(unsigned int row, unsigned int column, bool fullro addItem(row, column, copy, item, itemlen); - maxColLen[column] = mc; - cell = getCellAddy(row, column); - cell->fullrow = fullrow; - + if(fullrow) { + maxColLen[column] = mc; + cell = getCellAddy(row, column); + cell->fullrow = fullrow; + } return; } @@ -206,9 +207,11 @@ void NmapOutputTable::addItemFormatted(unsigned int row, addItem(row, column, fullrow, true, buf, res); - maxColLen[column] = mc; - cell = getCellAddy(row, column); - cell->fullrow = fullrow; + if(fullrow) { + maxColLen[column] = mc; + cell = getCellAddy(row, column); + cell->fullrow = fullrow; + } } // Returns the maximum size neccessary to create a printableTable() (the