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

os: fix getline warning for linux

This commit is contained in:
Nicolas Sauzede 2020-02-28 02:43:42 +01:00 committed by GitHub
parent b8f6284daf
commit f5fdbfd004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -705,7 +705,7 @@ pub fn get_raw_line() string {
} $else {
max := size_t(0)
mut buf := byteptr(0)
nr_chars := C.getline(&buf, &max, stdin)
nr_chars := C.getline(&charptr(buf), &max, stdin)
defer { unsafe{ free(buf) } }
if nr_chars == 0 || nr_chars == -1 {
return ''