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

This commit is contained in:
Eric Pouech 2011-03-15 22:26:49 +01:00 committed by Alexandre Julliard
parent 34acd88a2e
commit 77eefaed58
1 changed files with 2 additions and 2 deletions

View File

@ -507,8 +507,8 @@ int input_read_line(const char* pfx, char* buf, int size)
int len = input_fetch_entire_line(pfx, &line); int len = input_fetch_entire_line(pfx, &line);
if (len < 0) return 0; if (len < 0) return 0;
/* remove trailing \n */ /* remove trailing \n and \r */
if (len > 0 && line[len - 1] == '\n') len--; while (len > 0 && (line[len - 1] == '\n' || line[len - 1] == '\r')) len--;
len = min(size - 1, len); len = min(size - 1, len);
memcpy(buf, line, len); memcpy(buf, line, len);
buf[len] = '\0'; buf[len] = '\0';