From c4f9a01b7fd4a8406137bf3f31e7c4f1ad186a15 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Thu, 14 Dec 2023 19:39:15 +0900 Subject: [PATCH] Fix typo in `get_next_word(...)` --- src/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 08db272..2f5b35f 100644 --- a/src/main.cc +++ b/src/main.cc @@ -16,7 +16,7 @@ std::string get_next_word(std::istream *i) { if (in != std::char_traits::eof() && in != ' ' && in != '\n' && in != '\r') { word.push_back((char)in); } else if (in == ' '|| in == '\n' || in == '\r' || in == '\t') { - if (word.empty()) { + if (!word.empty()) { break; } else { continue;