From e3bcbbf82278c55115d1910cdfa88d00210d9be6 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 8 Oct 2025 22:10:31 +0200 Subject: [PATCH] Fix FEN reading A space now is recognized as the end of the board part, rather than taken as piece ID. --- hachu.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hachu.c b/hachu.c index ee53b1e..1aa2acd 100644 --- a/hachu.c +++ b/hachu.c @@ -10,7 +10,7 @@ // promotions by pieces with Lion power stepping in & out the zone in same turn // promotion on capture -#define VERSION "0.21d" +#define VERSION "0.21" //define PATH level==0 || path[0] == 0x82906b && (level==1 || path[1] == 0x8790d9 && (level == 2 || path[2] == 0x8598ca && (level == 3 /*|| path[3] == 0x3e865 && (level == 4 || path[4] == 0x4b865 && (level == 5))*/))) #define PATH 0 @@ -377,7 +377,6 @@ PieceDesc makaPieces[] = { {"fY", "", 10, { 0,X,0,0,X,0,0,X } }, // Free Tile +Y {"fU", "", 10, { 0,X,0,0,0,0,0,X } }, // Free Stone +U {"EM", "", 10, { 0,0,0,0,0,0,0,0 } }, // Emperor +K - {"TK", "", 1300, { K,K,K,K,K,K,K,K }, 0, 6}, // Teaching King +I' {"BS", "", 1500, { S,S,S,S,S,S,S,S }, 0, 7}, // Budhist Spirit +J' {"WS", "", 10, { X,X,0,X,1,X,0,X } }, // Wizard Stork +N' @@ -958,7 +957,7 @@ SetUp (char *array, int var) int pflag=0; if(*array == '+') pflag++, array++; c = name[0] = *array++; - if(!c) goto eos; + if(!c || c == ' ') goto eos; if(c == '.') continue; if(c > '0' && c <= '9') { c -= '0'; if(*array >= '0' && *array <= '9') c = 10*c + *array++ - '0'; -- 1.7.0.4