Skip to content

Commit

Permalink
Fixed order of operations issue with bool compare
Browse files Browse the repository at this point in the history
  • Loading branch information
luciensadi committed Jan 3, 2025
1 parent 7c4b226 commit 0e5dc5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ void affect_total(struct char_data * ch)

// has_trigger was initialized to -1, why not initialize to 0 and not check for has_trigger?
if (has_wired && has_trigger) {
has_wired = MIN(has_wired, has_trigger == -1 ? 3 : has_trigger);
has_wired = MIN(has_wired, (has_trigger == -1 ? 3 : has_trigger));
GET_INIT_DICE(ch) += has_wired;
GET_REA(ch) += has_wired * 2;
}
Expand Down

0 comments on commit 0e5dc5f

Please sign in to comment.