(uint8_t)

This commit is contained in:
jl777
2019-03-26 23:10:16 -11:00
parent 5f2eeac994
commit 7e1fc1ef09
2 changed files with 4 additions and 4 deletions

View File

@@ -761,11 +761,11 @@ int32_t games_progress(struct games_state *rs,int32_t waitflag,uint64_t seed,gam
for (i=0; i<num; i++)
{
if ( sizeof(gamesevent) == 1 )
sprintf(&hexstr[i<<1],"%02x",keystrokes[i]&0xff);
sprintf(&hexstr[i<<1],"%02x",(uint8_t)keystrokes[i]&0xff);
else if ( sizeof(gamesevent) == 2 )
sprintf(&hexstr[i<<2],"%04x",keystrokes[i]&0xffff);
sprintf(&hexstr[i<<2],"%04x",(uint16_t)keystrokes[i]&0xffff);
else if ( sizeof(gamesevent) == 4 )
sprintf(&hexstr[i<<3],"%08x",keystrokes[i]&0xffffffff);
sprintf(&hexstr[i<<3],"%08x",(uint32_t)keystrokes[i]&0xffffffff);
else if ( sizeof(gamesevent) == 8 )
sprintf(&hexstr[i<<4],"%016llx",(long long)(keystrokes[i]&0xffffffffffffffffLL));
}

View File

@@ -1,6 +1,6 @@
gcc -O3 -DBUILD_GAMESCC -DBUILD_PRICES -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -c -o pricescc.so cclib.cpp
cd games
gcc -O3 -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -DSTANDALONE -DBUILD_PRICES ../gamescc.cpp -lncurses -lcurl -o tetris
gcc -O3 -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -DSTANDALONE -DBUILD_PRICES ../gamescc.cpp -lncurses -lcurl -o prices
cd ..