Skip to content

Commit

Permalink
Fix errors in makekops.
Browse files Browse the repository at this point in the history
  • Loading branch information
elunna committed Sep 20, 2023
1 parent a4cbdf2 commit 6e76af9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions hackem_changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

Version 1.2.1 (unreleased)

Fix errors in makekops.
Cleanup makekops and imported kop kommissioners (from SlashTHEM).
Fix lightsaber deflection message (reported by Umbire). Fixes #480.
fix #K4006 - 'null obj after quiver merge' panic (NetHack 3.7)
Expand Down
7 changes: 3 additions & 4 deletions src/shk.c
Original file line number Diff line number Diff line change
Expand Up @@ -5644,9 +5644,8 @@ STATIC_OVL void
makekops(mm)
coord *mm;
{
const int TYPES = 5;
short k_mndx[TYPES];
int k_cnt[TYPES], cnt, mndx, k;
short k_mndx[5];
int k_cnt[5], cnt, mndx, k;
if (Is_blackmarket(&u.uz)) {
cnt = 7 + rnd(5);
k_mndx[0] = PM_SOLDIER;
Expand All @@ -5669,7 +5668,7 @@ coord *mm;
k_cnt[3] = (cnt / 9); /* and maybe a kaptain */
k_cnt[4] = (cnt / 12); /* and maybe a general */

for (k = 0; k < TYPES; k++) {
for (k = 0; k < 5; k++) {
if ((cnt = k_cnt[k]) == 0)
break;
mndx = k_mndx[k];
Expand Down

0 comments on commit 6e76af9

Please sign in to comment.