X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/form?a=blobdiff_plain;f=src%2Frexit.c;h=01c572775b611eb1ca5d6e0d5a6b6501131e54ee;hb=140cadf8f8dc73a1756169dbfa7cb5f05e3b8b8c;hp=e39a9feaa658fae15e8e9a40568e0b8994546d32;hpb=b66d0aa40912f26e80a61837cad2b5c743bf4d40;p=plomrogue diff --git a/src/rexit.c b/src/rexit.c index e39a9fe..01c5727 100644 --- a/src/rexit.c +++ b/src/rexit.c @@ -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)