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/freestyle/intern/application/AppCanvas.cpp')
-rw-r--r--source/blender/freestyle/intern/application/AppCanvas.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/application/AppCanvas.cpp b/source/blender/freestyle/intern/application/AppCanvas.cpp
index 5681c65e5d2..d34be79cd66 100644
--- a/source/blender/freestyle/intern/application/AppCanvas.cpp
+++ b/source/blender/freestyle/intern/application/AppCanvas.cpp
@@ -122,7 +122,7 @@ void AppCanvas::Erase()
void AppCanvas::readColorPixels(int x, int y, int w, int h, RGBImage &oImage) const
{
float *rgb = new float[3 * w * h];
- memset(rgb, 0, sizeof(float) * 3 * w * h);
+ memset(rgb, 0, sizeof(float[3]) * w * h);
int xsch = width();
int ysch = height();
if (_pass_diffuse.buf) {
@@ -161,8 +161,7 @@ void AppCanvas::readColorPixels(int x, int y, int w, int h, RGBImage &oImage) co
if (ii < 0 || ii >= rectx) {
continue;
}
- memcpy(
- rgb + (w * j + i) * 3, _pass_diffuse.buf + (rectx * jj + ii) * 3, sizeof(float) * 3);
+ memcpy(rgb + (w * j + i) * 3, _pass_diffuse.buf + (rectx * jj + ii) * 3, sizeof(float[3]));
}
}
}