blueloveTH 3 лет назад
Родитель
Сommit
cedde5a645
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      src/main.cpp

+ 1 - 0
src/main.cpp

@@ -20,6 +20,7 @@ std::string getline(bool* eof=nullptr) {
     std::string output;
     output.resize(length);
     WideCharToMultiByte(CP_UTF8, 0, wideInput.c_str(), (int)wideInput.length(), &output[0], length, NULL, NULL);
+    if(!output.empty() && output.back() == '\r') output.pop_back();
     return output;
 }