diff --git a/src/processor/tokenize.cc b/src/processor/tokenize.cc index 8b1cdb3a..85f77821 100644 --- a/src/processor/tokenize.cc +++ b/src/processor/tokenize.cc @@ -67,7 +67,7 @@ bool Tokenize(char *line, } void StringToVector(const string &str, vector &vec) { - vec.reserve(str.length() + 1); + vec.resize(str.length() + 1); std::copy(str.begin(), str.end(), vec.begin()); vec[str.length()] = '\0';