diff --git a/src/crafting.cpp b/src/crafting.cpp index 00869459eb0c3..7cec55fba8e1a 100644 --- a/src/crafting.cpp +++ b/src/crafting.cpp @@ -908,6 +908,11 @@ double player::crafting_success_roll( const recipe &making ) const const double skill_roll = dice( skill_dice, skill_sides ); const double diff_roll = dice( diff_dice, diff_sides ); + if( diff_roll == 0 ) { + // Automatic success + return 2; + } + return skill_roll / diff_roll; }