Code: Select all
if((attackR(KING(black),OCCUPIED) & bF1)) {codeblock}
- bF1 is static const ui64_t
The problem is the following: in my 64 bit compile (MS Express VS2008).
the codeblock is entered although the Attackgetter returns 0, when 0 is the correct value.
Code: Select all
The original code snippet looks like this.
// oo+ , ooo+
if((pos->cst & oow) && (attackR(KING(black),OCCUPIED) & bF1)) {generate_oow(pos,mli);}
if((pos->cst & ooow) && (attackR(KING(black),OCCUPIED) & bD1)) {generate_ooow(pos,mli);}
is to cast the expression explicit into an int-type. But of course that should not be necessary.
I am really out of ideas (done so far):
- results checked
- types checked
- moved code around
- checked expressions by its own
- ... , ... , ...
if you like i can include the statement into a seperate function and give you an assembly.
Or i can output what i cannot believe myself, the boolean result==1 although the bitboard
returns 0... i think i am going crazy here.
am i too blind to see sth. very obvious. Ideas are welcome
thx, Michael