xargs fix: r_flag

This commit is contained in:
Your Name 2023-12-07 16:06:30 +03:00
parent 07cf0c0f05
commit abdb5a8f03
1 changed files with 6 additions and 5 deletions

View File

@ -45,7 +45,12 @@ int stdin_read(void) {
int args_passed = 0;
while (1) {
int c = getchar();
if ((isspace(c) && strlen(arg) > 0) || c == EOF) {
if (c == EOF) {
ret = 2;
break;
}
else if (isspace(c) && strlen(arg) > 0) {
*p = '\0';
p = arg;
@ -53,10 +58,6 @@ int stdin_read(void) {
break;
args_passed++;
if (c == EOF) {
ret = 2;
break;
}
}
else {