Commit 77eefaed authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winedbg: Also get rid of trailing \r in input_read_line.

parent 34acd88a
......@@ -507,8 +507,8 @@ int input_read_line(const char* pfx, char* buf, int size)
int len = input_fetch_entire_line(pfx, &line);
if (len < 0) return 0;
/* remove trailing \n */
if (len > 0 && line[len - 1] == '\n') len--;
/* remove trailing \n and \r */
while (len > 0 && (line[len - 1] == '\n' || line[len - 1] == '\r')) len--;
len = min(size - 1, len);
memcpy(buf, line, len);
buf[len] = '\0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment