[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] Crash on entering matchid
From: |
Holger |
Subject: |
Re: [Bug-gnubg] Crash on entering matchid |
Date: |
Wed, 14 Apr 2004 18:13:36 -0700 |
At 05:29 14.04.2004, Jon Kinsey wrote:
Holger wrote:
Just a short bug report. On entering the following matchid gnubg crashes
(on Windows): 8AkgAAAAAAAA
(Accompanying posid is ds8DAGBr24AAOA, no problem with this.)
The funny thing is that I've got this pos from a match that I loaded
before. Even going to the same pos and hitting enter on the matchid gives
a crash.
Looks like this match id is a 1 pt match but also in a crawford game. This
obviously doesn't make much sense. Not sure where to put a fix, perhaps
in MatchFromKey()?
Seems like a good place to me. Maybe the Crawford flag will just not get
set if it's a 1-pter. How about this fix (untested and I can't commit from
here):
matchid.c:221:
if ( *pnMatchTo ) {
if ( anScore[ 0 ] < 0 || anScore[ 0 ] > *pnMatchTo )
return -1;
if ( anScore[ 1 ] < 0 || anScore[ 1 ] > *pnMatchTo )
return -1;
if ( *pnMatchTo == 1 ) {
*pfCrawford = 0;
}
}
Regards,
Holger