Merge: Read char
[nit.git] / lib / standard / file.nit
index 68853e1..1b81877 100644 (file)
@@ -1224,7 +1224,9 @@ end
 # Read a character from the standard input (`stdin`).
 fun getc: Char
 do
-       return sys.stdin.read_char.ascii
+       var c = sys.stdin.read_char
+       if c == null then return '\1'
+       return c
 end
 
 # Read a line from the standard input (`stdin`).