diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-05-31 20:06:38 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-05-31 20:08:58 +0300 |
commit | 875a8a6c79b0c5da1715b70eaa58b12f9b816767 (patch) | |
tree | d04ceb1b21f8989775b8ee58bf77b8854ed0c9ac /source/blender/blenfont | |
parent | 261a10edb0a9da53b2554ca64bcf445a8b9b3d9f (diff) |
Cleanup: Replace fseek() calls with BLI_fseek()
The fseek() function on Windows only accepts a 32-bit long offset
argument. Because of this we have our own version, BLI_fseek(), which
will use 64-bit _fseeki64() on Windows. This patch just replaces some
fseek() calls with BLI_fseek().
Differential Revision: https://developer.blender.org/D11430
Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/intern/blf_font_win32_compat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenfont/intern/blf_font_win32_compat.c b/source/blender/blenfont/intern/blf_font_win32_compat.c index 7d130204c07..e573d3bd224 100644 --- a/source/blender/blenfont/intern/blf_font_win32_compat.c +++ b/source/blender/blenfont/intern/blf_font_win32_compat.c @@ -66,7 +66,7 @@ static unsigned long ft_ansi_stream_io(FT_Stream stream, file = STREAM_FILE(stream); if (stream->pos != offset) { - fseek(file, offset, SEEK_SET); + BLI_fseek(file, offset, SEEK_SET); } return fread(buffer, 1, count, file); @@ -93,7 +93,7 @@ static FT_Error FT_Stream_Open__win32_compat(FT_Stream stream, const char *filep return FT_THROW(Cannot_Open_Resource); } - fseek(file, 0, SEEK_END); + BLI_fseek(file, 0LL, SEEK_END); stream->size = ftell(file); if (!stream->size) { fprintf(stderr, @@ -104,7 +104,7 @@ static FT_Error FT_Stream_Open__win32_compat(FT_Stream stream, const char *filep return FT_THROW(Cannot_Open_Stream); } - fseek(file, 0, SEEK_SET); + BLI_fseek(file, 0LL, SEEK_SET); stream->descriptor.pointer = file; stream->read = ft_ansi_stream_io; |