Flush the android logging buffer when most recent read fills it up.

This commit is contained in:
Josh Matthews 2018-10-15 10:47:12 -04:00
parent e75beaa8d6
commit 1332026bd4

View file

@ -509,7 +509,7 @@ fn redirect_stdout_to_logcat() {
} else {
cursor = 0;
}
} else if cursor == BUF_AVAILABLE {
} else if end == BUF_AVAILABLE {
// No newline found but the buffer is full, flush it anyway.
// `buf.as_ptr()` is null-terminated by BUF_LENGTH being 1 less than BUF_AVAILABLE.
unsafe {