X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d38cb3c850bd206ed40410c8cba241094ab90833..e8755e448558202feb64092ef8b1d91569ecc7db:/projects/sgconf/users.cpp diff --git a/projects/sgconf/users.cpp b/projects/sgconf/users.cpp index e9be65a6..fe74e677 100644 --- a/projects/sgconf/users.cpp +++ b/projects/sgconf/users.cpp @@ -131,7 +131,7 @@ res = !value.empty() && value[0] == 'y'; void Splice(std::vector > & lhs, const std::vector > & 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]); } @@ -142,7 +142,6 @@ return value; void ConvStringList(std::string value, std::vector > & res) { -value.erase(std::remove(value.begin(), value.end(), ' '), value.end()); Splice(res, Split > >(value, ',', ConvString)); }