Compara chaves do hash sem distinção de "caixa".
[cascardo/declara.git] / lib / pmhash.c
index ca9cfca..5bada1e 100644 (file)
@@ -78,7 +78,7 @@ void * pmhash_get(struct pmhash *pmhash, char *key)
        for (i = 0; i < pmhash->len; i++) {
                if (pmhash->items[i].key == NULL)
                        return NULL;
-               if (!strcmp(pmhash->items[i].key, key))
+               if (!strcasecmp(pmhash->items[i].key, key))
                        return pmhash->items[i].val;
        }
        return NULL;