Skip to content

Commit

Permalink
Fix: signed/unsigned comparison in deterministic credit-card lock chance
Browse files Browse the repository at this point in the history
Not serious but this makes the -Wall -Werror build fail.
  • Loading branch information
copperwater committed Jul 30, 2023
1 parent 5b41c94 commit 18fcd3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ pick_lock(
/* chance of unopenable door increases with depth;
* 10% on early floors, increasing to 60% or so by the Sanctum */
if (coord_hash(cc.x, cc.y, ledger_no(&u.uz)) % 10
< (depth(&u.uz) / 7) + 1) {
< (unsigned int) (depth(&u.uz) / 7) + 1) {
pline("It doesn't look like this lock can be opened with a credit card.");
return PICKLOCK_LEARNED_SOMETHING;
}
Expand Down

0 comments on commit 18fcd3a

Please sign in to comment.