summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/hash.c12
-rw-r--r--po/ProjetArchi.pot2
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/hash.c b/lib/hash.c
index 6d890f7..2850444 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -19,7 +19,7 @@ static int FonctionHachage(char *clef)
return (i);
}
}
- return (-1);
+ return (strlen(CHAINEHACHAGE));
}
_Element CreerElement(char *Nom, _TypeVariable Var)
@@ -95,7 +95,7 @@ char SupprimerDansTab(_TableauVariable * t, char *Nom)
{
int index = FonctionHachage(Nom);
- if (0 <= index && index < strlen(CHAINEHACHAGE)) {
+ if (0 <= index && index <= strlen(CHAINEHACHAGE)) {
Supprimer(&((*t)[index]), Nom);
} else {
return (0);
@@ -107,7 +107,7 @@ char InsererVarDansTab(_TableauVariable * t, _Element e)
{
int index = FonctionHachage(e.NomVar);
- if (0 <= index && index < strlen(CHAINEHACHAGE)) {
+ if (0 <= index && index <= strlen(CHAINEHACHAGE)) {
(*t)[index] = InserTete((*t)[index], e);
} else {
return (0);
@@ -158,8 +158,8 @@ int Initialise(_TableauVariable * t)
{
unsigned int i;
- (*t) = (_TableauVariable) Emalloc(sizeof(_ListeChaine) * strlen(CHAINEHACHAGE));
- for (i = 0; i < strlen(CHAINEHACHAGE); i++) {
+ (*t) = (_TableauVariable) Emalloc(sizeof(_ListeChaine) * (strlen(CHAINEHACHAGE) + 1));
+ for (i = 0; i <= strlen(CHAINEHACHAGE); i++) {
(*t)[i] = NULL;
}
return (i);
@@ -169,7 +169,7 @@ void DetruitTab(_TableauVariable * t)
{
int i;
- for (i = 0; i < strlen(CHAINEHACHAGE); i++) {
+ for (i = 0; i <= strlen(CHAINEHACHAGE); i++) {
Detruit(&((*t)[i]));
}
diff --git a/po/ProjetArchi.pot b/po/ProjetArchi.pot
index 5baf0cc..ef32584 100644
--- a/po/ProjetArchi.pot
+++ b/po/ProjetArchi.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-04-15 17:49+0200\n"
+"POT-Creation-Date: 2001-04-15 18:19+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"