changeset: 104728:44d15ba67d2e parent: 104726:665171386c65 parent: 104727:6b46c3deea2c user: Steve Dower date: Tue Oct 25 11:52:09 2016 -0700 description: Issue #28333: Fixes off-by-one error that was adding an extra space. diff -r 665171386c65 -r 44d15ba67d2e Parser/myreadline.c --- a/Parser/myreadline.c Tue Oct 25 20:20:29 2016 +0300 +++ b/Parser/myreadline.c Tue Oct 25 11:52:09 2016 -0700 @@ -225,7 +225,8 @@ if (wlen) { DWORD n; fflush(stderr); - WriteConsoleW(hStdErr, wbuf, wlen, &n, NULL); + /* wlen includes null terminator, so subtract 1 */ + WriteConsoleW(hStdErr, wbuf, wlen - 1, &n, NULL); } PyMem_RawFree(wbuf); }