diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-10-08 19:21:00 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-10-08 19:21:00 (GMT) |
commit | 1a3d50179b3355b6a0e9b8c8c79cf2467beabf90 (patch) | |
tree | f58cda560158cd337948097c84b5ea6aa4ec1f55 | |
parent | 55d2ba74e2ee9bb823af93c1d181ead89833e488 (diff) | |
parent | 59bd34fa8a58ca787152ca1bfd589dde3656ea91 (diff) | |
download | cpython-1a3d50179b3355b6a0e9b8c8c79cf2467beabf90.zip cpython-1a3d50179b3355b6a0e9b8c8c79cf2467beabf90.tar.gz cpython-1a3d50179b3355b6a0e9b8c8c79cf2467beabf90.tar.bz2 |
Issue #28333: Remove unnecessary increment.
-rw-r--r-- | Parser/myreadline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/myreadline.c b/Parser/myreadline.c index 4f7a9fc..e40951c 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -218,7 +218,7 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt) int wlen; wlen = MultiByteToWideChar(CP_UTF8, 0, prompt, -1, NULL, 0); - if (wlen++ && + if (wlen && (wbuf = PyMem_RawMalloc(wlen * sizeof(wchar_t)))) { wlen = MultiByteToWideChar(CP_UTF8, 0, prompt, -1, wbuf, wlen); |