home · contact · privacy
Made keybindings array into linked list; on the way rewrote / improved great parts...
[plomrogue] / src / rexit.c
index e39a9feaa658fae15e8e9a40568e0b8994546d32..01c572775b611eb1ca5d6e0d5a6b6501131e54ee 100644 (file)
@@ -33,12 +33,17 @@ static void cleanup(struct World * world)
     }
     if (cleanup_flags & CLEANUP_KEYBINDINGS)
     {
-        uint16_t key;
-        for (key = 0; key <= world->keyswindata->max; key++)
+/*
+        uint16_t i = 0;
+        struct KeyBinding * kb_p = world->keybindings;
+        while (1)
         {
+            free(kb_p);
             free(world->keybindings[key].name);
         }
         free(world->keybindings);
+*/
+        free_keybindings(world->keybindings);
         free(world->keyswindata);
     }
     if (cleanup_flags & CLEANUP_LOG)