blueloveTH 3 lat temu
rodzic
commit
a2b25f6735
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      src/repl.h

+ 1 - 0
src/repl.h

@@ -23,6 +23,7 @@ inline 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.size() && output[output.size()-1] == '\r') output.pop_back();
     return output;
 }