diff --git a/tree.c b/tree.c index a65cefe..acd0a2a 100644 --- a/tree.c +++ b/tree.c @@ -54,7 +54,7 @@ void add(struct node **tab_ptr_tree, wchar_t val[],int taille, int fl) int size(wchar_t val[]) { int cpt = 0; - while(val[cpt]!='\0') + while(val!= NULL && val[cpt]!='\0') { cpt++; } @@ -216,4 +216,4 @@ int split_text(dico Dico,wchar_t message[], wchar_t separateur[]) if(buffer!=NULL)err += split_text(Dico,buffer,separateur); return err; -} \ No newline at end of file +} -- libgit2 0.21.2