From 5a52509ec3b62d5b3775f82e20f0cd787605d265 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Sun, 3 Aug 2014 18:50:05 -0700 Subject: [PATCH] Compile fix --- lime/graphics/utils/ImageDataUtil.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lime/graphics/utils/ImageDataUtil.hx b/lime/graphics/utils/ImageDataUtil.hx index 485cc2214..06964d8b5 100644 --- a/lime/graphics/utils/ImageDataUtil.hx +++ b/lime/graphics/utils/ImageDataUtil.hx @@ -458,9 +458,10 @@ class ImageDataUtil { // TODO: optimize when rect is the same as the buffer size var data = image.buffer.data; - var offset = Math.round (4 * buffer.width * (rect.y + image.offsetX) + (rect.x + image.offsetY) * 4); + var offset = Math.round (4 * image.buffer.width * (rect.y + image.offsetX) + (rect.x + image.offsetY) * 4); var pos = offset; var boundR = Math.round (4 * (rect.x + rect.width + image.offsetX)); + var width = image.buffer.width; for (i in 0...len) {