Ticket #5550: patch_for_ticket#5550.diff

File patch_for_ticket#5550.diff, 1.2 KB (added by Manish Mulimani <manish.mulimani@…>, 11 years ago)

Patch for the bug.

  • boost/date_time/date_facet.hpp

     
    208208      //  return do_put_special(next, a_ios, fill_char, d.as_special());
    209209      //}
    210210      //The following line of code required the date to support a to_tm function
    211       std::tm dtm = {};
     211      std::tm dtm;
     212      std::memset(&dtm, 0, sizeof(dtm));
    212213      dtm.tm_mon = m - 1;
    213214      return do_put_tm(next, a_ios, fill_char, dtm, m_month_format);
    214215    }
     
    219220                char_type fill_char,
    220221                const day_type& day) const
    221222    {
    222       std::tm dtm = {};
     223      std::tm dtm;
     224      memset(&dtm, 0, sizeof(dtm));
    223225      dtm.tm_mday = day.as_number();
    224226      char_type tmp[3] = {'%','d'};
    225227      string_type temp_format(tmp);
     
    235237      //  return do_put_special(next, a_ios, fill_char, d.as_special());
    236238      //}
    237239      //The following line of code required the date to support a to_tm function
    238       std::tm dtm = {};
     240      std::tm dtm;
     241      memset(&dtm, 0, sizeof(dtm));
    239242      dtm.tm_wday = dow;
    240243      return do_put_tm(next, a_ios, fill_char, dtm, m_weekday_format);
    241244    }