Your message dated Sun, 04 May 2025 02:36:21 +0000
with message-id <[email protected]>
and subject line Bug#955454: fixed in bsdgames-nonfree 2.17-10
has caused the Debian Bug report #955454,
regarding bsdgames-nonfree: cannot spawn monster on same row as player
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
955454: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955454
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bsdgames-nonfree
Version: 2.17-6build1
Severity: normal
Tags: patch

Dear Maintainer,

I was reading the source for Rogue when I noticed the following curious
condition in the `create_monster` function:

                if (((row == rogue.row) && (col = rogue.col)) ||
                                (row < MIN_ROW) || (row > (DROWS-2)) ||
                                (col < 0) || (col > (DCOLS-1))) {
                        continue;
                }

The `(col = rogue.col)` looks suspect to me; should this perhaps read
`(col == rogue.col)`?

All other callers of `rand_around` do properly check `col == rogue.col`
rather than assigning to it (if they attempt to check it at all).

I'm pretty sure that I actually just hit this bug in game. I was in a
1-high tunnel and read a scroll of create monster, which failed:

        $ head rogue.screen
        you hear a faint cry of anguish in the distance
                                       -----------------
                        --------       |               +#################@
                        |      |     ##+      %        |
                        |      +###### |               |
                        ---+----       -----------------
                           #
                           #
                           #
                           #

>From this code, we can see that the only place that the monster could
have spawned was the tile to the left of the player, but that iteration
of the loop was skipped because `(col = rogue.col)` evaluates to 65,
which is true.

Please find enclosed a patch, should you choose to use it. (Consider it
released into the public domain; let me know if you want a specific
license.)

-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 
'xenial-backports'), (500, 'xenial')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.10.0-32-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bsdgames-nonfree depends on:
ii  libc6        2.23-0ubuntu11
ii  libncurses5  6.0+20160213-1ubuntu1
ii  libtinfo5    6.0+20160213-1ubuntu1

bsdgames-nonfree recommends no packages.

Versions of packages bsdgames-nonfree suggests:
pn  bsdgames  <none>

-- no debconf information
>From 3b3ff8bfb04224866b7573e0bf620299313ca9b4 Mon Sep 17 00:00:00 2001
From: William Chargin <[email protected]>
Date: Tue, 31 Mar 2020 19:39:13 -0700
Subject: [PATCH] monster: permit spawning on same row as player

Due to a typo, the `(row == rogue.row) && (col = rogue.col)` check is
effectively equivalent to `(row == rogue.row)`. This prevents monsters
from spawning on the same row as the player when a scroll of create
monster is read.

To reproduce, play Rogue until you find a scroll of create monster, then
enter a horizontal tunnel such that the only adjacent spaces are in the
same row as the player. Read the scroll, and note that you "hear a faint
cry of anger in the distance".
---
 rogue/monster.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rogue/monster.c b/rogue/monster.c
index 2bcc25d..30b0705 100644
--- a/rogue/monster.c
+++ b/rogue/monster.c
@@ -688,7 +688,7 @@ create_monster()
 
 	for (i = 0; i < 9; i++) {
 		rand_around(i, &row, &col);
-		if (((row == rogue.row) && (col = rogue.col)) ||
+		if (((row == rogue.row) && (col == rogue.col)) ||
 				(row < MIN_ROW) || (row > (DROWS-2)) ||
 				(col < 0) || (col > (DCOLS-1))) {
 			continue;
-- 
2.26.0


--- End Message ---
--- Begin Message ---
Source: bsdgames-nonfree
Source-Version: 2.17-10
Done: Aaron M. Ucko <[email protected]>

We believe that the bug you reported is fixed in the latest version of
bsdgames-nonfree, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aaron M. Ucko <[email protected]> (supplier of updated bsdgames-nonfree package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 03 May 2025 22:03:56 -0400
Source: bsdgames-nonfree
Architecture: source
Version: 2.17-10
Distribution: unstable
Urgency: medium
Maintainer: Aaron M. Ucko <[email protected]>
Changed-By: Aaron M. Ucko <[email protected]>
Closes: 955454
Changes:
 bsdgames-nonfree (2.17-10) unstable; urgency=medium
 .
   * Formally adopt format 3.0 (quilt), albeit with a consolidated patch.
   * debian/postrm: Use set -e rather than passing -e on the shebang-line.
   * rogue/monster.c: Belatedly fix a typo that broke monster creation in
     horizontal tunnels, thanks to the very patient William Chargin.
     (Closes: #955454.)
   * Standards-Version: 4.7.2 (routine-update)
Checksums-Sha1:
 4f6f25bd7f9f200d5a8d2b8b0dec05dc095516cc 2018 bsdgames-nonfree_2.17-10.dsc
 d6567f501b03c3dcc554feb808d37b7678766e83 9364 
bsdgames-nonfree_2.17-10.debian.tar.xz
Checksums-Sha256:
 46af9a9874101b2fe877bf866933ae8b3c98d9e49476d0019e0f600252856bf6 2018 
bsdgames-nonfree_2.17-10.dsc
 e0570f3f9837ffe70e00243612f1926ef76cf1d995481331c2eb4ee598f801da 9364 
bsdgames-nonfree_2.17-10.debian.tar.xz
Files:
 a0f4b63004ff10a15ac017ae258abdec 2018 non-free/games optional 
bsdgames-nonfree_2.17-10.dsc
 219013ff08084fcb28bb7f2e46c14626 9364 non-free/games optional 
bsdgames-nonfree_2.17-10.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfDq5z9IwvTDdAJxZHnCRsfFKZKIFAmgWyz4ACgkQHnCRsfFK
ZKJWWxAAiLlY9sCzWExSElZMnIW7pntbfWjRsMvTOYjjQLjfxQAmiga571jJjO67
tEvrf68cxPUvhgCGO9+JWyoTnDdb2EFqNGllkYopZN96T6gB3AeELG7jP/KpuA71
tTcR7/GZkLxSvU4orJytpalDlmNyFAIvkti0yH6ruobVNxwEQ6IVIi63/szhvNi5
Bvelz+jTYwsGp7ozJtt17bB/WxJ5OVWLu8JaEEJUA0ksuXaKbRRQHpSNMai/Djtu
IzZOzEJflnrdHgwJF1pqUt896BOtzdn4hW2SnAMAmxU2GaaKEuGRkk7uiqYxkwCV
QuvaLhFCpdtkyS1BXRxQBJ0uH+hLLDxUpf18WkVFQz66lNHAMg2qkjsxw+UZsOkR
ij5/C5KZUQWa//xB5xKx95toVEmCmZfnLQQS8/6DLW3EQrUABe2YnqtdpFfsL8Z4
p+oTRSBnTmIGoVTSZrxno7Ti92TmHRpUIgkUlFFXWsYO49HnZ1YN4QUPqoYWnfoY
5P7nklezEBNVpS0oj2jNhlB4SuHfjM8R3G1WTDDuBNYlzUypemKT4r0DvKlTML1O
bl+RgMfo2aM6QZxKL/pkKapKHaQ0KffKO/emglyu1MT45M7EgCW+ddizFNfEyfUO
Jxf4jqMfZZVI2yzlo/XpG5FBGwgZ44EL7ZZpIti2Fi3xR7YahdM=
=oLyy
-----END PGP SIGNATURE-----

Attachment: pgpf4JYmNjFaj.pgp
Description: PGP signature


--- End Message ---

Reply via email to