Correction de bug
- Correction du bug signalé dans le ticket #1 : il était impossible de relancer une partie sur le niveau facile. Solution : Retirer les malloc().
This commit is contained in:
parent
e9ec29aa7d
commit
6e6901d9c1
@ -29,10 +29,10 @@ int update_coups(int coups) {
|
|||||||
int game(int colonnes, int lignes) {
|
int game(int colonnes, int lignes) {
|
||||||
int i, j, t, used, r, l, c, case_max_width, case_max_height, case_max_dimensions, case_margin, boucle, coups, nb_paires_trouvees;
|
int i, j, t, used, r, l, c, case_max_width, case_max_height, case_max_dimensions, case_margin, boucle, coups, nb_paires_trouvees;
|
||||||
unsigned long int timer;
|
unsigned long int timer;
|
||||||
char *file = (char*)malloc(30 * sizeof(char));
|
char file[30];
|
||||||
size_t k, m;
|
size_t k, m;
|
||||||
card* last_card = NULL;
|
card* last_card = NULL;
|
||||||
int* tab = malloc(sizeof(int) * (colonnes * lignes));
|
int tab[colonnes * lignes];
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
for (i = 1; i > -1; i--) {
|
for (i = 1; i > -1; i--) {
|
||||||
@ -95,8 +95,6 @@ int game(int colonnes, int lignes) {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(tab);
|
|
||||||
free(file);
|
|
||||||
|
|
||||||
zone carte0 = {cards[0][0].zone.x, cards[0][0].zone.y, cards[0][0].zone.L, cards[0][0].zone.H};
|
zone carte0 = {cards[0][0].zone.x, cards[0][0].zone.y, cards[0][0].zone.L, cards[0][0].zone.H};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user