commit | 6c2b9d3479fbd425e0136abaadec4577b7918dbb | [log] [tgz] |
---|---|---|
author | Steve Dower <steve.dower@microsoft.com> | Tue Oct 25 11:51:54 2016 -0700 |
committer | Steve Dower <steve.dower@microsoft.com> | Tue Oct 25 11:51:54 2016 -0700 |
tree | a6518b3995a732345092ee0632d1985e78b5af45 | |
parent | 26231bb317d162eeae7d62942c2cfc7f2924cea2 [diff] |
Issue #28333: Fixes off-by-one error that was adding an extra space.
diff --git a/Parser/myreadline.c b/Parser/myreadline.c index e40951c..9f3c2e3 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c
@@ -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); }