Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-08-01 09:12:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-01 09:14:54 +0300
commit036312ecff459f7600361d5aba9a0dba896849a1 (patch)
tree9887d2823c4826e72bbdccb2fc3d312f1dfa8a4a /source/blender/blenlib
parent760dbd1cbf56e13b0a827afb6f7784fa46fff9b4 (diff)
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.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/storage.c4
1 files changed, 2 insertions, 2 deletions
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;