Made divide by zero/negative number...
...and multiplication by negative number error messages more accurate.
This commit is contained in:
parent
0d75659eaa
commit
17555a9fa3
1 changed files with 2 additions and 2 deletions
|
@ -855,7 +855,7 @@ effect::effect(const unit_ability_list& list, int def, bool backstab) :
|
|||
}
|
||||
if (const config::attribute_value *v = cfg.get("multiply")) {
|
||||
if(*v < 0) {
|
||||
ERR_NG << "multiplication by a negative number with multiply= in weapon special " << effect_id << "\n";
|
||||
ERR_NG << "multiplication by a negative number with multiply= in ability/weapon special " << effect_id << "\n";
|
||||
}
|
||||
else {
|
||||
int multiply = int(v->to_double() * 100);
|
||||
|
@ -867,7 +867,7 @@ effect::effect(const unit_ability_list& list, int def, bool backstab) :
|
|||
}
|
||||
if (const config::attribute_value *v = cfg.get("divide")) {
|
||||
if (*v <= 0) {
|
||||
ERR_NG << "division by zero or negative number with divide= in weapon special " << effect_id << "\n";
|
||||
ERR_NG << "division by zero or negative number with divide= in ability/weapon special " << effect_id << "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue