gwowen / opentyrian

Automatically exported from code.google.com/p/opentyrian
GNU General Public License v2.0
0 stars 0 forks source link

assert(episodeNum >= 1 && episodeNum <= 4) fails when pressing Esc in the "Select an Episode" screen. #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start opentyrian
2. Select "Start New Game"
3. Select "1 Player Full Game"
4. In the "Select an Episode" screen, press Esc

What is the expected output? What do you see instead?
I expect to return to the main menu, instead opentyrian exits due to an
assert failure.
This is because no episode was selected, yet opentyrian wants to use the
"selected" episode number to determine the amount of money to give the
player; since the player didn't actually select an episode in this case,
this leads to the assert failure.
The attached patch fixes this by making sure that opentyrian only proceeds
with the steps to start the game when the user has actually selected a
mode, eipsode and difficulty.

Original issue reported on code.google.com by a.h.vand...@gmail.com on 12 Dec 2009 at 7:05

Attachments:

GoogleCodeExporter commented 9 years ago
whitespace nitpicking

Original comment by a.h.vand...@gmail.com on 12 Dec 2009 at 8:21

Attachments:

GoogleCodeExporter commented 9 years ago
fixed as of revision 947fe16c5e
thanks for the patch

Original comment by mindless...@gmail.com on 12 Dec 2009 at 9:48