From 1332026bd4eac79ed975d6b7b43d5a7dd1ac6338 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 15 Oct 2018 10:47:12 -0400 Subject: [PATCH] Flush the android logging buffer when most recent read fills it up. --- ports/libsimpleservo/src/jniapi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libsimpleservo/src/jniapi.rs b/ports/libsimpleservo/src/jniapi.rs index 00487b417eb..ad027ec946a 100644 --- a/ports/libsimpleservo/src/jniapi.rs +++ b/ports/libsimpleservo/src/jniapi.rs @@ -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 {