From 74e32efbc8e292927db9b5e8118a63782ce96010 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 10 Jun 2014 17:10:37 +0600 Subject: Fix wrong memory write in partial render update with Save Buffers enabled No idea why this issue hasn't been spotted before. Took several hours to figure out where exactly wrong memory access happens.. P.S. I really want to switch ImBuf->rect from int* to unsigned char*... --- source/blender/imbuf/intern/colormanagement.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 21ee8ebe237..2644b8a278f 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -2809,7 +2809,7 @@ void IMB_partial_display_buffer_update(ImBuf *ibuf, const float *linear_buffer, int y; for (y = ymin; y < ymax; y++) { int index = y * buffer_width * 4; - memcpy(ibuf->rect + index, display_buffer + index, (xmax - xmin) * 4); + memcpy((unsigned char *)ibuf->rect + index, display_buffer + index, (xmax - xmin) * 4); } } } -- cgit v1.2.3