Skip to content

Commit e8cf5eb

Browse files
committed
#86 Crash on during evaluation
1 parent 30bc5e0 commit e8cf5eb

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

project/src/androidTest/java/de/earthlingz/oerszebra/DroidZebraTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ public void testCrash2() throws InterruptedException {
126126
}
127127

128128
@Test
129-
@Ignore
130129
public void testCrash86() throws InterruptedException {
131130
Intent intent = new Intent();
132131
intent.setAction(Intent.ACTION_SEND);

project/src/main/jni/droidzebra-jni.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,12 +1017,11 @@ void _droidzebra_undo_turn(int* side_to_move)
10171017
// undo moves until player is a human and he can make a move
10181018
void _droidzebra_undo_all(int* side_to_move)
10191019
{
1020-
int curr_move;
1020+
int curr_move;
10211021

1022+
//already at the beginning
10221023
if(score_sheet_row==0 && *side_to_move==BLACKSQ) return;
10231024

1024-
1025-
10261025
do {
10271026
_droidzebra_undo_stack_push(disks_played);
10281027
*side_to_move = OPP(*side_to_move);
@@ -1042,7 +1041,7 @@ void _droidzebra_undo_all(int* side_to_move)
10421041
black_moves[score_sheet_row] = PASS;
10431042
}
10441043

1045-
droidzebra_message_debug("undo: side_to_move %d, undo_move %d, score_sheet_row %d, disks_played %d, move_count %d", *side_to_move, curr_move, score_sheet_row, disks_played, move_count[disks_played]);
1044+
droidzebra_message_debug("undoall: side_to_move %d, undo_move %d, score_sheet_row %d, disks_played %d, move_count %d", *side_to_move, curr_move, score_sheet_row, disks_played, move_count[disks_played]);
10461045
} while( !(score_sheet_row==0 && *side_to_move==BLACKSQ));
10471046
clear_endgame_performed();
10481047
}
@@ -1124,7 +1123,6 @@ void _droidzebra_throw_engine_error(JNIEnv* env, const char* msg)
11241123

11251124
void _droidzebra_undo_stack_push(int val)
11261125
{
1127-
assert(s_undo_stack_pointer<64);
11281126
s_undo_stack[s_undo_stack_pointer++] = val;
11291127
}
11301128

0 commit comments

Comments
 (0)