Skip to content

Commit 9dbeba9

Browse files
committed
fix
1 parent 010a482 commit 9dbeba9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Parser/myreadline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
344344
break;
345345
}
346346
n += strlen(p + n);
347-
} while (n > 0 && p[n-1] != '\n');
347+
} while (n == 0 || p[n-1] != '\n');
348348

349349
pr = (char *)PyMem_RawRealloc(p, n+1);
350350
if (pr == NULL) {

0 commit comments

Comments
 (0)