[Bf-blender-cvs] [036312ecff4] master: Fix error de-duplicating BLI_file_read functions
Campbell Barton
noreply at git.blender.org
Thu Aug 1 08:15:53 CEST 2019
Commit: 036312ecff459f7600361d5aba9a0dba896849a1
Author: Campbell Barton
Date: Thu Aug 1 16:12:39 2019 +1000
Branches: master
https://developer.blender.org/rB036312ecff459f7600361d5aba9a0dba896849a1
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.
===================================================================
M source/blender/blenlib/intern/storage.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list