From 69888a5d89b893455295300d22006393d66ff474 Mon Sep 17 00:00:00 2001 From: Thomas Arp <357770+welcor@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:57:39 +0100 Subject: [PATCH] Update aedit.c (#145) fixes #144 Thanks to @gbstott for the bug report --- src/aedit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/aedit.c b/src/aedit.c index 5310c22..e8035da 100644 --- a/src/aedit.c +++ b/src/aedit.c @@ -557,7 +557,7 @@ void aedit_parse(struct descriptor_data * d, char *arg) { } if (OLC_ACTION(d)->command) free(OLC_ACTION(d)->command); - OLC_ACTION(d)->command = strdup(arg); + OLC_ACTION(d)->command = strdup(arg); break; @@ -566,10 +566,10 @@ void aedit_parse(struct descriptor_data * d, char *arg) { aedit_disp_menu(d); return; } - if (OLC_ACTION(d)->sort_as) { + if (OLC_ACTION(d)->sort_as) free(OLC_ACTION(d)->sort_as); - OLC_ACTION(d)->sort_as = strdup(arg); - } + OLC_ACTION(d)->sort_as = strdup(arg); + break; case AEDIT_MIN_CHAR_POS: