Fix typo in get_next_word(...)

This commit is contained in:
Stephen Seo 2023-12-14 19:39:15 +09:00
parent 3fee6e2538
commit c4f9a01b7f

View file

@ -16,7 +16,7 @@ std::string get_next_word(std::istream *i) {
if (in != std::char_traits<char>::eof() && in != ' ' && in != '\n' && in != '\r') { if (in != std::char_traits<char>::eof() && in != ' ' && in != '\n' && in != '\r') {
word.push_back((char)in); word.push_back((char)in);
} else if (in == ' '|| in == '\n' || in == '\r' || in == '\t') { } else if (in == ' '|| in == '\n' || in == '\r' || in == '\t') {
if (word.empty()) { if (!word.empty()) {
break; break;
} else { } else {
continue; continue;