mirror of
https://gitlab.com/manzerbredes/chess-move-interface.git
synced 2025-05-01 09:27:44 +00:00
Debug and new tests:
- Fix HalfMove memory leak - Fix integer overflow - Update combined tests
This commit is contained in:
parent
f4f436870f
commit
a1f2467a87
4 changed files with 1367 additions and 1 deletions
|
@ -5,6 +5,7 @@ namespace pgnp {
|
|||
HalfMove::HalfMove() : count(-1), isBlack(false), MainLine(NULL) {}
|
||||
|
||||
HalfMove::~HalfMove() {
|
||||
delete MainLine;
|
||||
for (auto *move : variations) {
|
||||
delete move;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ void PGN::ParseNextGame() {
|
|||
if (IS_EOF) {
|
||||
throw NoGameFound();
|
||||
}
|
||||
int loc = NextNonBlank(LastGameEndLoc);
|
||||
long loc = NextNonBlank(LastGameEndLoc);
|
||||
if (IS_EOF) {
|
||||
throw NoGameFound();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue