Upgrade to Bonanza 6.0
[bonanza.git] / next.c
diff --git a/next.c b/next.c
index f0153ac..a6937a3 100644 (file)
--- a/next.c
+++ b/next.c
@@ -3,7 +3,7 @@
 #include <limits.h>
 #include "shogi.h"
 
-int
+int CONV
 gen_next_move( tree_t * restrict ptree, int ply, int turn )
 {
   switch ( ptree->anext_move[ply].next_phase )
@@ -163,6 +163,7 @@ gen_next_move( tree_t * restrict ptree, int ply, int turn )
        ibest      = -1;
        ptree->move_last[ply] = GenNoCaptures( turn, ptree->move_last[ply] );
        ptree->move_last[ply] = GenDrop( turn, ptree->move_last[ply] );
+
        n = (int)( ptree->move_last[ply] - ptree->anext_move[ply].move_last );
        pmove = ptree->anext_move[ply].move_last;
        for ( i = 0; i < n; i++ )
@@ -260,7 +261,7 @@ gen_next_move( tree_t * restrict ptree, int ply, int turn )
 }
 
 
-int
+int CONV
 gen_next_evasion( tree_t * restrict ptree, int ply, int turn )
 {
   switch ( ptree->anext_move[ply].next_phase )
@@ -345,7 +346,7 @@ gen_next_evasion( tree_t * restrict ptree, int ply, int turn )
        {
          if ( *( ptree->anext_move[ply].move_last ) )
            {
-             ptree->current_move[ply] = *(ptree->anext_move[ply].move_last++);
+             MOVE_CURR = *(ptree->anext_move[ply].move_last++);
              return 1;
            }
          ptree->anext_move[ply].move_last++;