[Bf-blender-cvs] [3722da3b4e8] master: Cleanup: quiet harmless but annoying overflow
Campbell Barton
noreply at git.blender.org
Tue Apr 11 03:49:20 CEST 2017
Commit: 3722da3b4e8233138f9df16ffc9cb5cb120950d9
Author: Campbell Barton
Date: Tue Apr 11 11:48:00 2017 +1000
Branches: master
https://developer.blender.org/rB3722da3b4e8233138f9df16ffc9cb5cb120950d9
Cleanup: quiet harmless but annoying overflow
Caused asan to print warnings generating RNA
===================================================================
M source/blender/makesrna/intern/makesrna.c
===================================================================
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 4552c773097..9d68c05dda0 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -507,7 +507,7 @@ static void rna_float_print(FILE *f, float num)
{
if (num == -FLT_MAX) fprintf(f, "-FLT_MAX");
else if (num == FLT_MAX) fprintf(f, "FLT_MAX");
- else if ((int64_t)num == num) fprintf(f, "%.1ff", num);
+ else if ((ABS(num) < INT64_MAX) && ((int64_t)num == num)) fprintf(f, "%.1ff", num);
else fprintf(f, "%.10ff", num);
}
More information about the Bf-blender-cvs
mailing list