void Splice(std::vector<DIRPRICE_DATA_RES> & lhs, const std::vector<DIRPRICE_DATA_RES> & rhs)
{
-for (size_t i = 0; i < lhs.size(); ++i)
+for (size_t i = 0; i < lhs.size() && i < rhs.size(); ++i)
lhs[i].Splice(rhs[i]);
}
void Splice(std::vector<RESETABLE<std::string> > & lhs, const std::vector<RESETABLE<std::string> > & rhs)
{
-for (size_t i = 0; i < lhs.size(); ++i)
+for (size_t i = 0; i < lhs.size() && i < rhs.size(); ++i)
lhs[i].splice(rhs[i]);
}
void ConvStringList(std::string value, std::vector<RESETABLE<std::string> > & res)
{
-value.erase(std::remove(value.begin(), value.end(), ' '), value.end());
Splice(res, Split<std::vector<RESETABLE<std::string> > >(value, ',', ConvString));
}
if (!conf.nextTariff.empty())
stream << "<tariff delayed=\"" << conf.nextTariff.data() << "\"/>";
else if (!conf.tariffName.empty())
- stream << "<tariff now=\"" << conf.nextTariff.data() << "\"/>";
+ stream << "<tariff now=\"" << conf.tariffName.data() << "\"/>";
appendResetable(stream, "note", MaybeEncode(conf.note));
appendResetable(stream, "name", MaybeEncode(conf.realName)); // TODO: name -> realName