Ticket #1934: check_for_end_of_string.patch

File check_for_end_of_string.patch, 860 bytes (added by Thomas.Lemm@…, 14 years ago)

add a check for end of time zone string

  • boost/date_time/local_time/posix_time_zone.hpp

    old new  
    55 * Subject to the Boost Software License, Version 1.0. (See accompanying
    66 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
    77 * Author: Jeff Garland, Bart Garst
    8  * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
     8 * $Date: 2008-02-27 19:51:14 +0100 (Wed, 27 Feb 2008) $
    99 */
    1010
    1111#include <string>
     
    235235      string_type l_std_zone_abbrev, l_dst_zone_abbrev;
    236236
    237237      // get 'std' name/abbrev
    238       const typename string_type::const_iterator obj_end( obj.end() );
    239       while(sit != obj_end && std::isalpha(*sit)){
     238      while(std::isalpha(*sit)){
    240239        ss << *sit++;
    241240      }
    242241      l_std_zone_abbrev = ss.str();