Segmentation fault corrigé

master
DahmaneYanis 2 years ago
parent 6b3702c669
commit 158922079c

@ -27,6 +27,8 @@ VilleIut ** chargeIutDon(char nomFichier[], int * nbIut, int * nbMax)
*nbMax = 5; *nbMax = 5;
i = 0; i = 0;
while (!feof(fichier)) while (!feof(fichier))
{ {
@ -45,6 +47,7 @@ VilleIut ** chargeIutDon(char nomFichier[], int * nbIut, int * nbMax)
fclose(fichier); fclose(fichier);
fusionIut(tIut, nbIut); fusionIut(tIut, nbIut);
return tIut; return tIut;
} }

@ -81,10 +81,8 @@ Log * chargementLog(char * nomFichier, int * nbLog)
} }
fscanf(fichier, "%s %s %s", tLog[i].utilisateur, tLog[i].mdp, tLog[i].status); fscanf(fichier, "%s %s %s", tLog[i].utilisateur, tLog[i].mdp, tLog[i].status);
printf("%s\n", tLog[i].status);
i++; i++;
} }
*nbLog = i; *nbLog = i;
return tLog; return tLog;
} }

Loading…
Cancel
Save