1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

default struct vals

This commit is contained in:
Alexander Medvednikov
2019-11-24 13:53:59 +03:00
parent 7cc21be7de
commit 24b40be548
4 changed files with 21 additions and 2 deletions

View File

@@ -621,7 +621,7 @@ pub fn get_raw_line() string {
max_line_chars := 256
buf := &byte(malloc(max_line_chars*2))
if is_atty(0) > 0 {
h_input := C.GetStdHandle(C.STD_INPUT_HANDLE)
h_input := C.GetStdHandle(STD_INPUT_HANDLE)
mut nr_chars := u32(0)
C.ReadConsole(h_input, buf, max_line_chars * 2, voidptr(&nr_chars), 0)
return string_from_wide2(&u16(buf), int(nr_chars))