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:
authorAndrea Weikert <elubie@gmx.net>2006-01-17 20:23:44 +0300
committerAndrea Weikert <elubie@gmx.net>2006-01-17 20:23:44 +0300
commitd40162bc1a4a9cff9410217cb5359adddf634557 (patch)
tree76468b21dbcef47a2159dbceae3065e150f7f4ec /source/blender/imbuf/intern/rectop.c
parenteb839608be902c668256d7a91ff5a5e9c3a6acd9 (diff)
Fixed crash in pupmenu for image icons
* Scaled down image can be smaller than icon - bad memory access * Also needed to copy float buffer for exr images * rectcpy only copied first row There probably is some unnessary copying, will check with a little more time. For now better be safe since it's no huge amount of mem that is copied.
Diffstat (limited to 'source/blender/imbuf/intern/rectop.c')
-rw-r--r--source/blender/imbuf/intern/rectop.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c
index 4ddd7ca4814..c764d06b500 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -113,7 +113,14 @@ void IMB_rectcpy(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx,
for (;height > 0; height--){
memcpy(drect,srect, width * sizeof(int));
- if (do_float) memcpy(drectf,srectf, width * sizeof(float) * 4);
+ drect += destx;
+ srect += srcx;
+
+ if (do_float) {
+ memcpy(drectf,srectf, width * sizeof(float) * 4);
+ drectf += destx;
+ srectf += srcx;
+ }
}
}