fix jni crash on Nexus 9: give boolean default value

Crash occurs when creating new game: because there's no turn set yet the
jboolean has no set value (whatever was on the stack). Apparently the
java runtime accepts only 1 and 0 for jbooleans.
This commit is contained in:
Eric House 2016-10-25 08:03:18 -07:00
parent c3c2795f67
commit 45a6ddf8ec

View file

@ -1661,7 +1661,7 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1summarize
setInt( env, jsummary, "nMoves", nMoves );
XP_Bool gameOver = server_getGameIsOver( state->game.server );
setBool( env, jsummary, "gameOver", gameOver );
XP_Bool isLocal;
XP_Bool isLocal = XP_FALSE;
setInt( env, jsummary, "turn",
server_getCurrentTurn( state->game.server, &isLocal ) );
setBool( env, jsummary, "turnIsLocal", isLocal );