Change permission from 'r' to 'rb'
it is preferable to open the file in binary mode.pull/916/head
parent
2ca9866f86
commit
01d5f4d744
|
@ -5,7 +5,7 @@ module os
|
|||
type HANDLE voidptr // C.HANDLE
|
||||
|
||||
pub fn get_file_handle(path string) HANDLE {
|
||||
mode := 'r'
|
||||
mode := 'rb'
|
||||
_fh := C.fopen(path.cstr(), mode.cstr())
|
||||
if isnil(_fh) {
|
||||
return HANDLE(INVALID_HANDLE_VALUE)
|
||||
|
|
Loading…
Reference in New Issue