[Bf-blender-cvs] [9c7d2ff] master: Fix error in BLI_buffer_reinit
Campbell Barton
noreply at git.blender.org
Wed Dec 23 15:45:56 CET 2015
Commit: 9c7d2ff62f5fa28e13e7b63215382260c744ef35
Author: Campbell Barton
Date: Thu Dec 24 01:36:20 2015 +1100
Branches: master
https://developer.blender.org/rB9c7d2ff62f5fa28e13e7b63215382260c744ef35
Fix error in BLI_buffer_reinit
alloc_size was set incorrectly causing arrays not to be resized correctly.
===================================================================
M source/blender/blenlib/intern/buffer.c
===================================================================
diff --git a/source/blender/blenlib/intern/buffer.c b/source/blender/blenlib/intern/buffer.c
index 525b183..e217214 100644
--- a/source/blender/blenlib/intern/buffer.c
+++ b/source/blender/blenlib/intern/buffer.c
@@ -123,7 +123,7 @@ void BLI_buffer_reinit(BLI_Buffer *buffer, const size_t new_count)
buffer->alloc_count = new_count;
}
- buffer->data = buffer_alloc(buffer, new_count);
+ buffer->data = buffer_alloc(buffer, buffer->alloc_count);
}
else {
if (buffer->flag & BLI_BUFFER_USE_CALLOC) {
More information about the Bf-blender-cvs
mailing list