changeset 52001:0b36afd411ec

8211163: UNIX version of Java_java_io_Console_echo does not return a clean boolean Reviewed-by: shade, alanb
author aph
date Wed, 03 Oct 2018 17:29:47 +0100
parents 7d036fb69443
children 8897e41b327c
files src/java.base/unix/native/libjava/Console_md.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/unix/native/libjava/Console_md.c	Wed Oct 03 08:03:13 2018 -0700
+++ b/src/java.base/unix/native/libjava/Console_md.c	Wed Oct 03 17:29:47 2018 +0100
@@ -56,7 +56,7 @@
         JNU_ThrowIOExceptionWithLastError(env, "tcgetattr failed");
         return !on;
     }
-    old = (tio.c_lflag & ECHO);
+    old = (tio.c_lflag & ECHO) != 0;
     if (on) {
         tio.c_lflag |= ECHO;
     } else {