Ticket #8391: b8391.patch

File b8391.patch, 808 bytes (added by frank.oosterhuis@…, 10 years ago)

patch

  • boost/date_time/tz_db_base.hpp

     
    303303        tokenizer tokens(rule, sep); // 3 fields
    304304       
    305305        tokenizer_iterator tok_iter = tokens.begin();
    306         nth = std::atoi(tok_iter->c_str()); ++tok_iter;
    307         d   = std::atoi(tok_iter->c_str()); ++tok_iter;
    308         m   = std::atoi(tok_iter->c_str());
     306       
     307        if (tok_iter != tokens.end()) {
     308                        nth = std::atoi(tok_iter->c_str()); ++tok_iter;
     309                }
     310        if (tok_iter != tokens.end()) {
     311                        d   = std::atoi(tok_iter->c_str()); ++tok_iter;
     312                }
     313                if (tok_iter != tokens.end()) {
     314                        m   = std::atoi(tok_iter->c_str());
     315                }
    309316      }
    310317
    311318