well, if anyone is interrested, the bug is in playercard_setReservedRounds. in 3 out of 4 calls to memeset there is a parenthesis missing. correct the lines containing
...sizeof(*(aPlayerCard->opponents))*reservedRounds-aPlayerCard->reservedRounds
There are still another bugs. They are in functions setting pointer to NULL, but they do it only in local scope. Need to change playercard_finalize, playerlistentry_finalize, playerlist_finalize, pairinglistentry_finalize, pairinglist_finalize, playergroup_finalize so they take pointer to pointer.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey, I maybe the only one live using this SW...
I have a nice crash for the authors:
gswiss < inputfile
where inputfile is the following: (6 players, end of 2nd round)
The crash is in a realloc. (running either on a Solaris UNIX, a Linux or a Cygwin, always the same point)
1,2286,1,,4,B,0,3,W,0
2,33715,1477,,5,W,0,6,B,=
3,7242,1,,6,W,1,1,B,1
4,5361,1793,,1,W,1,5,B,1
5,7262,1,,2,B,1,4,W,0
6,13796,1507,,3,B,0,2,W,=
well, if anyone is interrested, the bug is in playercard_setReservedRounds. in 3 out of 4 calls to memeset there is a parenthesis missing. correct the lines containing
...sizeof(*(aPlayerCard->opponents))*reservedRounds-aPlayerCard->reservedRounds
to
sizeof(*(aPlayerCard->opponents))*(reservedRounds-aPlayerCard->reservedRounds)
There are still another bugs. They are in functions setting pointer to NULL, but they do it only in local scope. Need to change playercard_finalize, playerlistentry_finalize, playerlist_finalize, pairinglistentry_finalize, pairinglist_finalize, playergroup_finalize so they take pointer to pointer.