$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r49988 - trunk/tools/quickbook/detail
From: daniel_james_at_[hidden]
Date: 2008-11-28 10:05:21
Author: danieljames
Date: 2008-11-28 10:05:21 EST (Fri, 28 Nov 2008)
New Revision: 49988
URL: http://svn.boost.org/trac/boost/changeset/49988
Log:
When processing template arguments, deal with the case when there's no content after the last space or there are more arguments than expected.
Text files modified: 
   trunk/tools/quickbook/detail/actions.cpp |     4 +++-                                    
   1 files changed, 3 insertions(+), 1 deletions(-)
Modified: trunk/tools/quickbook/detail/actions.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.cpp	(original)
+++ trunk/tools/quickbook/detail/actions.cpp	2008-11-28 10:05:21 EST (Fri, 28 Nov 2008)
@@ -503,7 +503,7 @@
         {
             if (template_.size()-1 != template_info.size())
             {
-                while (template_.size()-1 != template_info.size())
+                while (template_.size()-1 > template_info.size())
                 {
                     // Try to break the last argument at the first space found
                     // and push it into the back of template_info. Do this
@@ -516,6 +516,8 @@
                         break;
                     std::string first(str.begin(), str.begin()+l_pos);
                     std::string::size_type r_pos = str.find_first_not_of(" \t\r\n", l_pos);
+                    if (r_pos == std::string::npos)
+                        break;
                     std::string second(str.begin()+r_pos, str.end());
                     str = first;
                     template_info.push_back(second);