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:
authorNicholas Bishop <nicholasbishop@gmail.com>2007-12-19 02:27:26 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2007-12-19 02:27:26 +0300
commit592ed2c812bb760109ded411cf4616d84979f90d (patch)
tree9d714a3a94523b27bf46526788073f086faa3bb4 /source/blender/src
parent5518aaaace192f9d9fea351faab1acd17845e6a5 (diff)
Fixed bug #7960, Sculpt Mode: Crash after Scaling brush to 1 ("Tile" mode)
Division by zero fix
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/sculptmode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/src/sculptmode.c b/source/blender/src/sculptmode.c
index 8afd1dafd6a..7dd668e1acb 100644
--- a/source/blender/src/sculptmode.c
+++ b/source/blender/src/sculptmode.c
@@ -857,8 +857,10 @@ float tex_strength(EditData *e, float *point, const float len,const unsigned vin
px= len * cos(angle) + 2000;
py= len * sin(angle) + 2000;
}
- px %= sx-1;
- py %= sy-1;
+ if(sx != 1)
+ px %= sx-1;
+ if(sy != 1)
+ py %= sy-1;
p= get_texcache_pixel(ss, tcw*px/sx, tch*py/sy);
} else {
float fx= (pv.co[0] - e->mouse[0] + half) * (tcw*1.0f/bsize) - tcw/2;