Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions changelog.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
# optional section in the html page.
#

[ENTRY]
Module: flatzinc
What: bug
Rank: minor
Thanks: Jip J. Dekker
[DESCRIPTION]
Fixed the initialisation of the random number generator for the
FlatZinc executable. This fix ensures the generator is always
initialised.

[RELEASE]
Version: 6.0.0
Date: 2018-02-�23
Expand Down
4 changes: 2 additions & 2 deletions gecode/flatzinc/flatzinc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ namespace std {

namespace Gecode { namespace FlatZinc {

// Unitialized default random number generator
Rnd defrnd;
// Default random number generator
Rnd defrnd(0);

/**
* \brief Branching on the introduced variables
Expand Down
2 changes: 1 addition & 1 deletion gecode/flatzinc/parser.tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ namespace Gecode { namespace FlatZinc {
}

if (fzs == NULL) {
fzs = new FlatZincSpace();
fzs = new FlatZincSpace(rnd);
}
ParserState pp(data, sbuf.st_size, err, fzs);
#else
Expand Down
2 changes: 1 addition & 1 deletion gecode/flatzinc/parser.yxx
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ namespace Gecode { namespace FlatZinc {
}

if (fzs == NULL) {
fzs = new FlatZincSpace();
fzs = new FlatZincSpace(rnd);
}
ParserState pp(data, sbuf.st_size, err, fzs);
#else
Expand Down