Fix for windows stdin input

This commit is contained in:
skuater 2015-11-09 23:39:39 +01:00 committed by pancake
parent a411b06b59
commit f5dec28846

View File

@ -343,7 +343,7 @@ static int rax (char *str, int len, int last) {
}
static int use_stdin () {
static char buf[STDIN_BUFFER_SIZE];
char * buf = malloc (STDIN_BUFFER_SIZE);
int l, sflag = (flags & 5);
if (! (flags & 16384)) {
for (l=0; l>=0; l++) {
@ -366,6 +366,7 @@ static int use_stdin () {
}
if (l>0)
rax (buf, l, 0);
free (buf);
return 0;
}