[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6271] Fix defect introduced 20150819T1702Z: last header l
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6271] Fix defect introduced 20150819T1702Z: last header line missing |
Date: |
Fri, 28 Aug 2015 15:20:25 +0000 |
Revision: 6271
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6271
Author: chicares
Date: 2015-08-28 15:20:24 +0000 (Fri, 28 Aug 2015)
Log Message:
-----------
Fix defect introduced 20150819T1702Z: last header line missing
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/wx_table_generator.cpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2015-08-26 19:06:38 UTC (rev 6270)
+++ lmi/trunk/ChangeLog 2015-08-28 15:20:24 UTC (rev 6271)
@@ -36723,3 +36723,9 @@
group_quote_pdf_gen_wx.cpp
Add a footer, which will soon be augmented.
+20150828T1520Z <address@hidden> [477]
+
+ wx_table_generator.cpp
+Fix defect introduced 20150819T1702Z: last header line missing. See:
+ http://lists.nongnu.org/archive/html/lmi/2015-08/msg00054.html
+
Modified: lmi/trunk/wx_table_generator.cpp
===================================================================
--- lmi/trunk/wx_table_generator.cpp 2015-08-26 19:06:38 UTC (rev 6270)
+++ lmi/trunk/wx_table_generator.cpp 2015-08-28 15:20:24 UTC (rev 6271)
@@ -57,11 +57,15 @@
// here.
std::vector<std::string> lines;
std::string line;
- for(std::string::const_iterator i = s.begin(); i != s.end(); ++i)
+ for(std::string::const_iterator i = s.begin(); ; ++i)
{
- if('\n' == *i)
+ if(i == s.end() || '\n' == *i)
{
lines.push_back(line);
+ if(i == s.end())
+ {
+ break;
+ }
line.clear();
}
else
@@ -69,6 +73,7 @@
line += *i;
}
}
+ LMI_ASSERT(lines.size() == count_lines(s));
return lines;
}
@@ -315,7 +320,7 @@
std::vector<std::string> const lines(split_in_lines(ci.header_));
// Fill the elements from the bottom line to the top one, so that a
- // single line header is shown on the last line, as per the spec.
+ // single line header is shown on the last line.
std::size_t const first_line = max_header_lines_ - lines.size();
for(std::size_t line = 0; line < lines.size(); ++line)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6271] Fix defect introduced 20150819T1702Z: last header line missing,
Greg Chicares <=