I'm trying to recreate minesweeper in C and I am pretty sure that i have finished the program but i have 2 problems with it. The game runs but it will only let me inter the coordinates 2 time before it quits out and i'm not sure where it is quiting out from. The second problem is with the floodfill. It is ment to use recursion to uncover all the cells next to the one that have been entered then store them in the structure and print them. But for some reason it isn't working at all. I have the program set up for now to print the game board showing all the bombs first to I can see what i am doing untill I get these erros fixed. I have included my code and the compiled program so you can see these errors. Thank you for any help that you will be able to provide.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

struct ms{
	int bombs;
	int uncovered;
	int printvalue;
} field[9][9];

void floodfill (struct ms field[][9], int, int);
void winning (struct ms field[][9], int, int);
void printing (struct ms field[][9], int, int);
void cell_numbering (struct ms field[][9], int, int);
void compair (struct ms field[][9], int, int);

int main (void)
{

	int b,i,o;

	srand(time(NULL));
	for(b=0;b<10;b++){
		i=rand()%9;
		o=rand()%9;
		if (field[i][o].bombs == 42)b--;
		field[i][o].bombs = 42;
			}

	for (i=0;i<9;i++){
		for(o=0;o<9;o++){
			if (field[i][o].bombs != 42){
				field[i][o].bombs = 48;}}
	}

cell_numbering(field, i, o);

printf("\n\n\t*******************\n\t*   MineSweeper   *\n\t*******************\n"); 
printf("\n\t  0 1 2 3 4 5 6 7 8\n\t  -----------------\n");
	for(i=0;i<9;i++)printf("\t%d|%c %c %c %c %c %c %c %c %c|\n", i, field[i][0].bombs,field[i][1].bombs,field[i][2].bombs,field[i][3].bombs,field[i][4].bombs,field[i][5].bombs,field[i][6].bombs,field[i][7].bombs,field[i][8].bombs); 
printf("\t  -----------------");
printf("\n\nEnter Coordinates Values: ");
scanf("%d %d", &i, &o);
field[i][o].uncovered = 1;
if (field[i][o].bombs == 42){printf("\nBOOM!!! Game Over, you hit a bomb.\n"); return 0;}
	
for(b=2; b != 1; b++){
	compair(field, i, o);
	printing(field, i, o);

}

return 0;
	
	}

void cell_numbering (struct ms field[][9], int i, int o){

		/*outer bonds, courners, 00, 80, 08, 88*/
	if (field[0][0].bombs == 42){if (field[1][0].bombs != 42)field[1][0].bombs++; if (field[1][1].bombs != 42)field[1][1].bombs++; if (field[0][1].bombs != 42)field[0][1].bombs++;}
	if (field[0][8].bombs == 42){if (field[0][7].bombs != 42)field[0][7].bombs++; if (field[1][7].bombs != 42)field[1][7].bombs++; if (field[1][8].bombs != 42)field[1][8].bombs++;}
	if (field[8][0].bombs == 42){if (field[7][0].bombs != 42)field[7][0].bombs++; if (field[7][1].bombs != 42)field[7][1].bombs++; if (field[8][1].bombs != 42)field[8][1].bombs++;}
	if (field[8][8].bombs == 42){if (field[7][7].bombs != 42)field[7][7].bombs++; if (field[7][8].bombs != 42)field[7][8].bombs++; if (field[8][7].bombs != 42)field[8][7].bombs++;}
	
	/*Sides left*/
	for(i=1;i<8;i++){
			if (field[i][0].bombs == 42){
				if (field[i-1][0].bombs != 42)field[i-1][0].bombs++; 
				if (field[i+1][0].bombs != 42)field[i+1][0].bombs++; 
				if (field[i][1].bombs != 42)field[i][1].bombs++;
				if (field[i+1][1].bombs != 42)field[i+1][1].bombs++; 
				if (field[i-1][1].bombs != 42)field[i-1][1].bombs++;
			}
	}
	/*Side Right*/
	for(i=1;i<8;i++){
		if (field[i][8].bombs == 42){
			if (field[i-1][8].bombs != 42)field[i-1][8].bombs++; 
			if (field[i+1][8].bombs != 42)field[i+1][8].bombs++; 
			if (field[i][7].bombs != 42)field[i][7].bombs++;
			if (field[i+1][7].bombs != 42)field[i+1][7].bombs++; 
			if (field[i-1][7].bombs != 42)field[i-1][7].bombs++;
		}
	}
	/*Top wall*/
	for(o=1;o<8;o++){
		if (field[0][o].bombs == 42){
			if (field[0][o-1].bombs != 42)field[0][o-1].bombs++; 
			if (field[0][o+1].bombs != 42)field[0][o+1].bombs++; 
			if (field[1][o].bombs != 42)field[1][o].bombs++;
			if (field[1][o-1].bombs != 42)field[1][o-1].bombs++; 
			if (field[1][o+1].bombs != 42)field[1][o+1].bombs++;
		}
	}
	/*Bottom wall*/
	for(o=1;o<8;o++){
		if (field[8][o].bombs == 42){
			if (field[8][o-1].bombs != 42)field[8][o-1].bombs++; 
			if (field[8][o+1].bombs != 42)field[8][o+1].bombs++; 
			if (field[7][o].bombs != 42)field[7][o].bombs++;
			if (field[7][o-1].bombs != 42)field[7][o-1].bombs++; 
			if (field[7][o+1].bombs != 42)field[7][o+1].bombs++;
		}
	}
	/*for i = 1-8 and o = 1-8, inner bonds*/
	for (i=1;i<8;i++){
		for (o=1;o<8;o++){
			if (field[i][o].bombs == 42){
					if (field[i-1][o].bombs != 42)field[i-1][o].bombs++;
					if (field[i+1][o].bombs != 42)field[i+1][o].bombs++;
					if (field[i-1][o+1].bombs != 42)field[i-1][o+1].bombs++;
					if (field[i][o+1].bombs != 42)field[i][o+1].bombs++;
					if (field[i+1][o+1].bombs != 42)field[i+1][o+1].bombs++;
					if (field[i-1][o-1].bombs != 42)field[i-1][o-1].bombs++;
					if (field[i][o-1].bombs != 42)field[i][o-1].bombs++;
					if (field[i+1][o-1].bombs != 42)field[i+1][o-1].bombs++;
				}
			}
		}

	return;
	}
	
void printing (struct ms field[][9], int i, int o){
printf("\n\t  0 1 2 3 4 5 6 7 8\n\t  -----------------\n");
	for(i=0;i<9;i++)printf("\t%d|%c %c %c %c %c %c %c %c %c|\n", i, field[i][0].printvalue,field[i][1].printvalue,field[i][2].printvalue,field[i][3].printvalue,field[i][4].printvalue,field[i][5].printvalue,field[i][6].printvalue,field[i][7].printvalue,field[i][8].printvalue); 
printf("\t  -----------------");
printf("\n\nEnter Coordinates Values: ");
scanf("%d %d", &i, &o);
field[i][o].uncovered = 1;
if (field[i][o].bombs == 42){printf("\nBOOM!!! Game Over, you hit a bomb.\n"); exit (0);}
	floodfill(field, i, o);
	winning(field, i, o);
}


void floodfill (struct ms field[][9], int i, int o){
		if((i<0) || (o<0) || (i>8) || (o>8))return;
		
	field[i][o].uncovered = 1;
 	
	floodfill(field, i-1, o);
 	floodfill(field, i, o-1);
	floodfill(field, i, o+1);
 	floodfill(field, i+1, o);
			}


void winning (struct ms field[][9], int i, int o){
	int cnt;
	
	for(i=0;i<9;i++){
		for(o=0;o<9;o++){
			if(field[i][o].uncovered == 0)cnt++;
		}
	}

	if(cnt == 10){printf("\nYou Win!!!");exit (0);}
	}

void compair (struct ms field[][9], int i, int o){

/*compaire*/
for(i=0;i<9;i++){
	for(o=0;o<9;o++){
		if (field[i][o].uncovered == 1)field[i][o].printvalue = field[i][o].bombs;
		if(field[i][o].uncovered == 0)field[i][o].printvalue = 45;
		if(field[i][o].printvalue == 48)field[i][o].printvalue = 32;
			}
		}
}