reset n before stderr path too

This commit is contained in:
Laytan Laats
2024-10-05 11:26:23 +02:00
parent f61996fd6f
commit c21e62ddb4
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -426,6 +426,7 @@ process_exec :: proc(
}
if err == nil && !stderr_done {
n = 0
has_data, err = pipe_has_data(stderr_r)
if has_data {
n, err = read(stderr_r, buf[:])
+1
View File
@@ -21,4 +21,5 @@ test_process_exec :: proc(t: ^testing.T) {
testing.expect_value(t, state.success, true)
testing.expect_value(t, err, nil)
testing.expect_value(t, string(stdout), "hellope\n")
testing.expect_value(t, string(stderr), "")
}