Ver Fonte

Update main.cpp

blueloveTH há 3 anos atrás
pai
commit
cedde5a645
1 ficheiros alterados com 1 adições e 0 exclusões
  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;
 }