[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] handicap
From: |
Paul Pogonyshev |
Subject: |
[gnugo-devel] handicap |
Date: |
Tue, 27 Aug 2002 22:27:23 +0300 |
i hope i'll get some cvs soon ;)
here's one more problem: (play_ascii, as usual). try placing some
handicap (better handicap 9) and then load a game with no handicap.
gnu go will probably crash (if in the loaded game there's a stone on a
handicap position).
this seems to solve the problem (no patches yet, sorry):
case CMD_LOAD:
strtok(command, " ");
tmpstring = strtok(NULL, " ");
if (tmpstring) {
/* discard newline */
tmpstring[strlen(tmpstring)-1] = 0;
if (!sgftree_readfile(&sgftree, tmpstring))
{
fprintf(stderr, "Cannot open or parse '%s'\n", tmpstring);
break;
}
sgf_initialized = 0;
+++ gameinfo_load_sgfheader(gameinfo, sgftree.root);
gameinfo_play_sgftree(gameinfo, sgftree.root, NULL);
sgfOverwritePropertyInt(sgftree.root, "HA", gameinfo->handicap);
curnode = sgftreeNodeCheck(&sgftree, 0);
}
else
printf("Please specify a filename\n");
break;
the marked line is line 919 in 3.3.5
regards,
Paul Pogonyshev
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] handicap,
Paul Pogonyshev <=