aboutsummaryrefslogtreecommitdiff
path: root/src/pipe.c
diff options
context:
space:
mode:
authorne_mene <[email protected]>2026-03-02 01:59:19 +0100
committerne_mene <[email protected]>2026-03-02 01:59:19 +0100
commit8922e8488b5ab8c003d252afee97f435de73333d (patch)
treeb299f161d457ddce0fbf72ac9d1fac7d2d16ab4f /src/pipe.c
parentcec2fcedf8dfdd839b0580451d0bce0d0351e780 (diff)
fixed utf8 space issue
Diffstat (limited to 'src/pipe.c')
-rw-r--r--src/pipe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pipe.c b/src/pipe.c
index 202a89c..70b9483 100644
--- a/src/pipe.c
+++ b/src/pipe.c
@@ -34,7 +34,7 @@ void await_change(void) {
while (argc < MAX_ARGS) {
char chr = buff[i];
- if (chr == '\0') {
+ if (chr == '\0' || chr == '\n') {
break;
}
@@ -57,6 +57,10 @@ void await_change(void) {
i++;
}
+ if (chr_on > 0) {
+ argv[argc][chr_on] = '\0';
+ argc++;
+ }
make_change(argv, argc);
}