From 60575480583500f27698e2e3e372ec8fab40033e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 21 Jun 2015 16:06:44 +0200 Subject: Fix/Cleanup possibility to type insane values in 'add' operators options. Our 'hard limit' values was too often max_int/float here, mis-typing could lead to crash (or infinite hanging) of Blender, see e.g. http://blender.stackexchange.com/questions/32790/blender-forces-computer-to-reboot-after-mistyping-extreme-value-for-resolution-i --- source/blender/editors/armature/armature_add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index e3a69a89a57..59453f0ac71 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -1036,7 +1036,7 @@ void ARMATURE_OT_subdivide(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* Properties */ - prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10); + prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, 1000, "Number of Cuts", "", 1, 10); /* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */ RNA_def_property_flag(prop, PROP_SKIP_SAVE); } -- cgit v1.2.3