From cb6e3e19d854d007261bff00910388dc0180d59c Mon Sep 17 00:00:00 2001 From: habu Date: Mon, 8 Feb 2010 14:33:33 +0000 Subject: [PATCH] =?utf8?q?=E8=87=AA=E5=8B=95=E6=8B=BE=E3=81=84=E3=82=A8?= =?utf8?q?=E3=83=87=E3=82=A3=E3=82=BF=E3=81=AE=E3=83=A1=E3=83=A2=E3=83=AA?= =?utf8?q?=E3=83=AA=E3=83=BC=E3=82=AF=E3=82=92=E4=BF=AE=E6=AD=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/autopick.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/autopick.c b/src/autopick.c index 12794762f..cd77a199b 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -3711,6 +3711,8 @@ static void search_for_object(text_body_type *tb, object_type *o_ptr, bool forwa while (TRUE) { + bool match; + /* End of list? */ if (forward) { @@ -3725,8 +3727,9 @@ static void search_for_object(text_body_type *tb, object_type *o_ptr, bool forwa if (!autopick_new_entry(entry, tb->lines_list[i], FALSE)) continue; /* Does this line match to the object? */ - if (!is_autopick_aux(o_ptr, entry, o_name)) continue; - + match = is_autopick_aux(o_ptr, entry, o_name); + autopick_free_entry(entry); + if (!match) continue; /* Found a line but it's inactive */ if (tb->states[i] & LSTAT_BYPASS) @@ -6324,6 +6327,7 @@ void do_cmd_edit_autopick(void) free_text_lines(tb->lines_list); + string_free(tb->search_str); string_free(tb->last_destroyed); /* Destroy string chain */ -- 2.11.0