mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 17:27:19 +02:00
Merge pull request #50 from VexFlint/fix/linux-console-crlf
Accept CRLF lines on the Linux server console
This commit is contained in:
1 file changed
+3
@@ -191,6 +191,9 @@ struct Input {
|
||||
}
|
||||
for (ssize_t i = 0; i < count; ++i) {
|
||||
if (buffer[i] == '\n') {
|
||||
// CRLF input (a script saved on Windows, a panel or telnet): without
|
||||
// this, "quit\r" is an unknown command and the server keeps running.
|
||||
if (!pending.empty() && pending.back() == '\r') pending.pop_back();
|
||||
std::lock_guard lock(mutex);
|
||||
lines.push_back(pending);
|
||||
pending.clear();
|
||||
|
||||
Reference in new issue
Block a user