diff --git a/analyseur.c b/analyseur.c index 92c41f9..5291083 100644 --- a/analyseur.c +++ b/analyseur.c @@ -229,7 +229,8 @@ typedef struct { int est_mot_vide(const char *mot) { for (int i = 0; i < NB_MOTS_VIDES; i++) { - if (egales(mot, MOTS_VIDES[i])) + /* comparaison complète seulement si la première lettre correspond */ + if (MOTS_VIDES[i][0] == mot[0] && egales(mot, MOTS_VIDES[i])) return 1; } return 0;