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/scaling.c')
-rw-r--r--source/blender/imbuf/intern/scaling.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index c962f1fbde5..8db51f50ee0 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -964,10 +964,18 @@ struct ImBuf *IMB_scalefastImBuf(struct ImBuf *ibuf, short newx, short newy)
ofsy += stepy;
ofsx = 32768;
- for (x = newx ; x>0 ; x--){
- if (do_rect) *newrect++ = rect[ofsx >> 16];
- if (do_float) *newrectf++ = rectf[ofsx >> 16];
- ofsx += stepx;
+ if (do_rect) {
+ for (x = newx ; x>0 ; x--){
+ *newrect++ = rect[ofsx >> 16];
+ ofsx += stepx;
+ }
+ }
+
+ if (do_float) {
+ for (x = newx ; x>0 ; x--){
+ *newrectf++ = rectf[ofsx >> 16];
+ ofsx += stepx;
+ }
}
}