|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84755 - branches/release/boost/date_time
From: marshall_at_[hidden]
Date: 2013-06-13 10:00:48
Author: marshall
Date: 2013-06-13 10:00:48 EDT (Thu, 13 Jun 2013)
New Revision: 84755
URL: http://svn.boost.org/trac/boost/changeset/84755
Log:
Apply patch to release branch; Fixes #8391
Properties modified:
branches/release/boost/date_time/tz_db_base.hpp (contents, props changed)
Text files modified:
branches/release/boost/date_time/tz_db_base.hpp | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
Modified: branches/release/boost/date_time/tz_db_base.hpp
==============================================================================
--- branches/release/boost/date_time/tz_db_base.hpp Thu Jun 13 08:03:55 2013 (r84754)
+++ branches/release/boost/date_time/tz_db_base.hpp 2013-06-13 10:00:48 EDT (Thu, 13 Jun 2013) (r84755)
@@ -301,7 +301,15 @@
const char_type sep_char[] = { ';', '\0'};
char_separator_type sep(sep_char);
tokenizer tokens(rule, sep); // 3 fields
-
+
+ if ( std::distance ( tokens.begin(), tokens.end ()) != 3 ) {
+ std::ostringstream msg;
+ msg << "Expecting 3 fields, got "
+ << std::distance ( tokens.begin(), tokens.end ())
+ << " fields in line: " << rule;
+ boost::throw_exception(bad_field_count(msg.str()));
+ }
+
tokenizer_iterator tok_iter = tokens.begin();
nth = std::atoi(tok_iter->c_str()); ++tok_iter;
d = std::atoi(tok_iter->c_str()); ++tok_iter;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk