tmp
is a bit mask with only two bits, so the inner loop should be for ( i = 0; i < 2; i++ )
.
Also the correct index into the polje
array is polje[currentSubset * 2 + i][0]
since each subset
in polje
takes two spaces and i
is either 0 or 1.