You're running your function twice for each iteration.
Try this (untested) :
Code:
  for(int i = 0; i < anzSchritte; i++){
        if((nextStep(insectZeiger, laenge, raster)) == 3){
            printf("Gecrasht bei %u",i);
            break;
        }
   }