diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/linux/platform.c | 2 | ||||
| -rw-r--r-- | src/platform.h | 1 | ||||
| -rw-r--r-- | src/windows/platform.c | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/linux/platform.c b/src/linux/platform.c index 5f48ea1..daa0120 100644 --- a/src/linux/platform.c +++ b/src/linux/platform.c @@ -261,7 +261,7 @@ bool platform_directory_exists(char *path) s32 platform_get_file_size(char *path) { - FILE *file = fopen(path, "r"); + FILE *file = fopen(path, "rb"); if (!file) return -1; fseek(file, 0 , SEEK_END); diff --git a/src/platform.h b/src/platform.h index 6a32212..b3d30e9 100644 --- a/src/platform.h +++ b/src/platform.h @@ -124,6 +124,7 @@ typedef enum t_file_open_error FILE_ERROR_REMOTE_IO_ERROR = 8,
FILE_ERROR_STALE = 9, // NFS server file is removed/renamed
FILE_ERROR_GENERIC = 10,
+ FILE_ERROR_TOO_BIG = 11,
} file_open_error;
struct open_dialog_args
diff --git a/src/windows/platform.c b/src/windows/platform.c index 3d6c7dd..70a1b7d 100644 --- a/src/windows/platform.c +++ b/src/windows/platform.c @@ -782,7 +782,7 @@ void platform_window_swap_buffers(platform_window *window) s32 platform_get_file_size(char *path)
{
- FILE *file = fopen(path, "r");
+ FILE *file = fopen(path, "rb");
if (!file) return -1;
fseek(file, 0 , SEEK_END);
|
