Fix #914 rax2 -s/-S (Theodore Quaid patch)

This commit is contained in:
pancake 2014-05-13 23:21:54 +02:00
parent 31caee0ab4
commit 8e4b7c0f70

View File

@ -237,7 +237,7 @@ static int rax (char *str, int len, int last) {
static int use_stdin () {
static char buf[STDIN_BUFFER_SIZE];
int l, sflag = (flags & 4);
int l, sflag = (flags & 5);
for (l=0; l>=0; l++) {
int n = read (0, buf+l, sizeof (buf)-l);
if (n<1) break;
@ -251,7 +251,7 @@ static int use_stdin () {
buf[strlen (buf)] = '\0';
else buf[strlen (buf)-1] = '\0';
if (!rax (buf, l, 0)) break;
l = 0;
l = -1;
}
if (l>0)
rax (buf, l, 0);