Skip to content

Commit 9289974

Browse files
committed
Remove output of '\0' in lab-8
1 parent 932f977 commit 9289974

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/usr/pipe_test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ pub fn main() -> usize {
3030
let ch: u8 = 0;
3131
loop {
3232
sys_read(pipefd[0] as usize, &ch as *const u8, 1);
33-
string.push(ch as char);
3433
if ch == 0 {
3534
break;
3635
}
36+
string.push(ch as char);
3737
}
3838
println!("message received in child process = {}", string);
3939
} else {

0 commit comments

Comments
 (0)