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:
Diffstat (limited to 'source/blender/imbuf/intern/divers.c')
-rw-r--r--source/blender/imbuf/intern/divers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index bcc8488089d..798849f2dd4 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -666,7 +666,7 @@ void IMB_buffer_byte_from_byte(uchar *rect_to,
if (profile_to == profile_from) {
/* same profile, copy */
- memcpy(to, from, sizeof(uchar) * 4 * width);
+ memcpy(to, from, sizeof(uchar[4]) * width);
}
else if (profile_to == IB_PROFILE_LINEAR_RGB) {
/* convert to sRGB to linear */
@@ -785,7 +785,7 @@ void IMB_float_from_rect(ImBuf *ibuf)
size_t size;
size = ((size_t)ibuf->x) * ibuf->y;
- size = size * 4 * sizeof(float);
+ size = sizeof(float[4]) * size;
ibuf->channels = 4;
rect_float = MEM_callocN(size, "IMB_float_from_rect");