Update main.cpp

This commit is contained in:
blueloveTH 2023-03-17 18:32:16 +08:00
parent 117d23592d
commit cedde5a645

View File

@ -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;
}