Skip to content

BUG: Handling end-of-file encountered in parsing numerical data in game files #457

Description

@bcollin3

If you call Game.parse_game() on a string that ends in a decimal utility value then the program will crash after a minute or two after consuming all of the system's ram.
For example:

import pygambit as gbt
s='NFG 1 R "prisoners dilemma"\n {"Player 1" "Player 2"} {2 2}\n -6 -6 -10 0 0 -10 -1 -1.0'
gbt.Game.parse_game(s)

will cause a crash but

import pygambit as gbt
s='NFG 1 R "prisoners dilemma"\n {"Player 1" "Player 2"} {2 2}\n -6 -6 -10 0 0 -10 -1 -1.0\n'
gbt.Game.parse_game(s)

will not.

Metadata

Metadata

Assignees

Labels

bugc++Items which involve writing in C++good-first-issueItems which are (relatively) straightforward, and good ways to get into the code

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions