Your message dated Sat, 16 Feb 2019 22:19:10 +0000
with message-id <[email protected]>
and subject line Bug#922485: fixed in brainparty 0.61+dfsg-5
has caused the Debian Bug report #922485,
regarding brainparty: Minigame "Symbolic Logic": Premises are empty or contain 
garbage.
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.)


-- 
922485: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922485
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: brainparty
Version: 0.61+dfsg-3+b1
Severity: normal
Tags: patch

Dear Maintainer,

the minigame "Symbolic Logic" whithin brainparty cannot be played
because the premises are not shown.


Steps to reproduce:
    
Start the program and select the game "Symbolic Logic".
I can select it by clicking on 
- "PLAY!" 
- "PRACTISE" 
- 3 times "MORE" for searching the "Symbolic Logic" minigame
- the item in the middle which has an icon with a text like "All sales
  assist / wrestle crocodi / Catherine ...". 
- Then a description of the game appears, and I click anywhere on
  this description. 
- Now the game starts.


Expected behaviour:

I expect 3 sentences: Two premises and a conclusion.


Observed behaviour:

The conclusion is shown.
The two premises are completely missing, only two full stops appear.
Sometimes, I see some garbage characters instead.


Patch:

I have debugged the program a bit and I think the responsible function
is "const char* FlattenPremise(...)" which returns a pointer to a
temporary string object which is undefined behaviour.

I would suggest the following patch. The patch refers to
brainparty_0.61+dfsg-3 (I am on Debian stable), but when I browse the
sources on https://salsa.debian.org/games-team/brainparty the bug
still seems to exist.


--- a/symboliclogic.cpp Sat Feb 16 21:39:30 2019 +0100
+++ b/symboliclogic.cpp Sat Feb 16 21:49:13 2019 +0100
@@ -116,7 +116,7 @@
   }
 }
    
-const char* 
BPMiniGame_SymbolicLogic::FlattenPremise(BPMiniGame_SymbolicLogic_Premise* 
premise) {
+string 
BPMiniGame_SymbolicLogic::FlattenPremise(BPMiniGame_SymbolicLogic_Premise* 
premise) {
   ostringstream result;
   
   switch (premise->Type) {
@@ -150,7 +150,7 @@
         break;
   }
      
-  return result.str().c_str();
+  return result.str();
 }

 void BPMiniGame_SymbolicLogic::Tick() {

--- a/symboliclogic.h   Sat Feb 16 21:39:30 2019 +0100
+++ b/symboliclogic.h   Sat Feb 16 21:49:13 2019 +0100
@@ -67,7 +67,7 @@
   void Start();
   int GetWeight();
   void Render();
-  const char* FlattenPremise(BPMiniGame_SymbolicLogic_Premise* premise);
+  string FlattenPremise(BPMiniGame_SymbolicLogic_Premise* premise);
   void Tick();

   void OnMouseDown();



Thank you.


-- System Information:
Debian Release: 9.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-8-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages brainparty depends on:
ii  brainparty-data           0.61+dfsg-3
ii  fonts-freefont-ttf        20120503-6
ii  libc6                     2.24-11+deb9u4
ii  libgcc1                   1:6.3.0-18+deb9u1
ii  libgl1-mesa-glx [libgl1]  13.0.6-1+b2
ii  libglu1-mesa [libglu1]    9.0.0-2.1
ii  libsdl-gfx1.2-5           2.0.25-5
ii  libsdl-image1.2           1.2.12-5+deb9u1
ii  libsdl-mixer1.2           1.2.12-11+b3
ii  libsdl-ttf2.0-0           2.0.11-3+b1
ii  libsdl1.2debian           1.2.15+dfsg1-4
ii  libstdc++6                6.3.0-18+deb9u1

brainparty recommends no packages.

brainparty suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: brainparty
Source-Version: 0.61+dfsg-5

We believe that the bug you reported is fixed in the latest version of
brainparty, 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.
Markus Koschany <[email protected]> (supplier of updated brainparty 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, 16 Feb 2019 22:48:49 +0100
Source: brainparty
Architecture: source
Version: 0.61+dfsg-5
Distribution: unstable
Urgency: medium
Maintainer: Debian Games Team <[email protected]>
Changed-By: Markus Koschany <[email protected]>
Closes: 922485
Changes:
 brainparty (0.61+dfsg-5) unstable; urgency=medium
 .
   * Declare compliance with Debian Policy 4.3.0.
   * Use canonical VCS URI.
   * Fix Symbolic Logic minigame. Premises were empty or contained garbage
     characters. Thanks to Johann Suhter for the report and patch.
     (Closes: #922485)
Checksums-Sha1:
 c341c3b970899c79d76de196d59af8a691499370 2311 brainparty_0.61+dfsg-5.dsc
 e602f1e41285e9714d2776e0ae069fc4b2dfa4e3 104116 
brainparty_0.61+dfsg-5.debian.tar.xz
 f5471d536cbb934df4806218a8686e0c3f996cda 11688 
brainparty_0.61+dfsg-5_amd64.buildinfo
Checksums-Sha256:
 28822acd98a4b3632b47555cd2ab99a1730a9f7dfad6dc90e545433118caa2e4 2311 
brainparty_0.61+dfsg-5.dsc
 57337b034686939b2bc73554d63faaa530af3e40a536401d56a21ec918bd053c 104116 
brainparty_0.61+dfsg-5.debian.tar.xz
 353938d4320fa66fb29cd2f1c654a4f0a96a657efe1302b39f26e5a69130f57a 11688 
brainparty_0.61+dfsg-5_amd64.buildinfo
Files:
 5e834242aecdb482a68c125f5e7ae901 2311 games optional brainparty_0.61+dfsg-5.dsc
 f7a6b45e7cbb3abe0590f53371b10a50 104116 games optional 
brainparty_0.61+dfsg-5.debian.tar.xz
 6144fc5fba4dc8c718d3ab9a1c22db92 11688 games optional 
brainparty_0.61+dfsg-5_amd64.buildinfo

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

iQKjBAEBCgCNFiEErPPQiO8y7e9qGoNf2a0UuVE7UeQFAlxoh4dfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEFD
RjNEMDg4RUYzMkVERUY2QTFBODM1RkQ5QUQxNEI5NTEzQjUxRTQPHGFwb0BkZWJp
YW4ub3JnAAoJENmtFLlRO1HkY1cP/3MjueRWYEk2a091qqMBKVkZub3NdC1RTxFc
15LpXZVdKRgsnXDAulQPdOZpuSQ4iTPU4SStyBH7LtpXeN9sZPVboh+/kTzVtYD5
FVOfaR6Z3MHcjJcfl0pDOWf/rHqxD7tf49ljPgi+F+g0rm+L52EgYDwbo8TukpGw
VZQypbX5iB3KwgEAtNOazu3chRXKla3FYKjnAv0Dnmwl60EX02wW5kJ7MBkIvZc9
zw3Q03hhONMHcGQpWq6/dBNVhoLZv3pHknG/BKoPmgyCsh16qM6UGoeMP0kRSZtW
091U6dWQEfG3Is4ys58LMAw2IX0qjsSC/dbd2eK45jWn3gqv9E8zQ4FTQTpf5pRD
YHZbcInK9LXRRWgfVhzxJ1k4Z6BR+9YUq3jBLlaWMcRdXRg6GNDo2jgVBXYVXFGo
thg3YUk6PQOHJbYXSagjwcLYEw6jse7Emg8WxyebeExxeNCem+TTNRy70LiY/DAs
n1hj9JI87ZvDXi6v2QL6Q8TRRG1pt07R7gbUMYcESLWlHGPbdpMDURkAdNOydYx1
EUKULOZYKRGAiSldocwk6ZjQ3VDh3jGwxs+gGT6cqHgOA82qIOPDtakXYpefzTXC
C3egV8oVfyZc5Z6Pn4TyCquJxiMuXUHJrubA9KjVc3mxZm5CUDDTq8bU83klaaVQ
2vMLLArK
=u1hf
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to