Parcourir la source

Update main.cpp

blueloveTH il y a 3 ans
Parent
commit
cedde5a645
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  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;
 }