Native_fopen for Win32 had incorrect arguments.

This commit is contained in:
Christoffer Lerno
2023-07-13 19:42:35 +02:00
committed by Christoffer Lerno
parent c7d90baad1
commit 26ee4babcf
3 changed files with 3 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ fn void*! native_fopen(String filename, String mode) @inline
@pool()
{
$if env::WIN32:
void* file = libc::_wfopen(filename.to_temp_wstring(), filename.to_temp_wstring())!;
void* file = libc::_wfopen(filename.to_temp_wstring(), mode.to_temp_wstring())!;
$else
void* file = libc::fopen(filename.zstr_tcopy(), mode.zstr_tcopy());
$endif