From 036312ecff459f7600361d5aba9a0dba896849a1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 1 Aug 2019 16:12:39 +1000 Subject: Fix error de-duplicating BLI_file_read functions Own error in recent code de-duplication: a345f56ce3331 causing issues on Windows. Flipped argument for reading the exact size. --- source/blender/blenlib/intern/storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 4ba198ac0b8..8d921b062dc 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -360,7 +360,7 @@ void *BLI_file_read_text_as_mem(const char *filepath, size_t pad_bytes, size_t * FILE *fp = BLI_fopen(filepath, "r"); void *mem = NULL; if (fp) { - mem = file_read_data_as_mem_impl(fp, true, pad_bytes, r_size); + mem = file_read_data_as_mem_impl(fp, false, pad_bytes, r_size); fclose(fp); } return mem; @@ -371,7 +371,7 @@ void *BLI_file_read_binary_as_mem(const char *filepath, size_t pad_bytes, size_t FILE *fp = BLI_fopen(filepath, "rb"); void *mem = NULL; if (fp) { - mem = file_read_data_as_mem_impl(fp, false, pad_bytes, r_size); + mem = file_read_data_as_mem_impl(fp, true, pad_bytes, r_size); fclose(fp); } return mem; -- cgit v1.2.3