diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-10 23:52:18 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-10 23:53:39 +0400 |
commit | 9e1ca2858920f059c957401160d0a9b75b6ff2bf (patch) | |
tree | 9314122239bd021519cf14b3166472883ad29f80 /source/blender/blenkernel/intern/mball.c | |
parent | bbab2ecd43cea89131619d525770f86d4154f26a (diff) |
Fix T38149: crash adding metaball with zero radius.
This incorrectly use abs(), that's for integers, not floats.
Diffstat (limited to 'source/blender/blenkernel/intern/mball.c')
-rw-r--r-- | source/blender/blenkernel/intern/mball.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 603eb50122f..40a12bd7e6c 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -1555,9 +1555,9 @@ static void find_first_points(PROCESS *process, MetaBall *mb, int a) workp_v = in_v; max_len = len_v3v3(out, in); - nx = abs((out[0] - in[0]) / process->size); - ny = abs((out[1] - in[1]) / process->size); - nz = abs((out[2] - in[2]) / process->size); + nx = fabsf((out[0] - in[0]) / process->size); + ny = fabsf((out[1] - in[1]) / process->size); + nz = fabsf((out[2] - in[2]) / process->size); max_dim = max_fff(nx, ny, nz); if (max_dim != 0.0f) { |