]> saetta.ns0.it Git - libzakutils/commitdiff
Wrong idx in Aptr::lookup_get_name.
authorAndrea Zagli <azagli@libero.it>
Fri, 2 Apr 2021 10:13:17 +0000 (12:13 +0200)
committerAndrea Zagli <azagli@libero.it>
Fri, 2 Apr 2021 10:13:17 +0000 (12:13 +0200)
src/aptrarray.c

index 3a078a4c349629d8a0f717869fa88a8e98a921ff..f66400483675772ad5ac7224481adc9b23fdf35c 100644 (file)
@@ -190,7 +190,7 @@ gchar
        g_hash_table_iter_init (&iter, zak_aptr_array->ht);
        while (g_hash_table_iter_next (&iter, &key, &value))
                {
-                       if (GPOINTER_TO_UINT (value) == idx)
+                       if (GPOINTER_TO_UINT (value) == (idx + 1))
                                {
                                        ret = g_strdup (key);
                                        break;