summaryrefslogtreecommitdiff
path: root/boost/date_time/time_facet.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/date_time/time_facet.hpp')
-rw-r--r--boost/date_time/time_facet.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/boost/date_time/time_facet.hpp b/boost/date_time/time_facet.hpp
index b3cda2c023..b9abedfba9 100644
--- a/boost/date_time/time_facet.hpp
+++ b/boost/date_time/time_facet.hpp
@@ -7,7 +7,7 @@
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: Martin Andrian, Jeff Garland, Bart Garst
- * $Date: 2012-07-27 11:15:55 -0700 (Fri, 27 Jul 2012) $
+ * $Date$
*/
#include <cctype>
@@ -822,7 +822,7 @@ namespace date_time {
const_itr itr(m_time_duration_format.begin());
while (itr != m_time_duration_format.end() && (sitr != stream_end)) {
if (*itr == '%') {
- ++itr;
+ if (++itr == m_time_duration_format.end()) break;
if (*itr != '%') {
switch(*itr) {
case 'O':
@@ -994,7 +994,7 @@ namespace date_time {
const_itr itr(this->m_format.begin());
while (itr != this->m_format.end() && (sitr != stream_end)) {
if (*itr == '%') {
- ++itr;
+ if (++itr == this->m_format.end()) break;
if (*itr != '%') {
// the cases are grouped by date & time flags - not alphabetical order
switch(*itr) {