diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 89d51edac..1015f302a 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ New features:: Bug fixes:: * irc: fix string comparison when CASEMAPPING is set to "ascii" + * script: fix crash when a `/script` command triggers another `/script` command (issue #923) Tests:: diff --git a/src/plugins/script/script-action.c b/src/plugins/script/script-action.c index 551733c2f..ce0097491 100644 --- a/src/plugins/script/script-action.c +++ b/src/plugins/script/script-action.c @@ -1254,6 +1254,9 @@ script_action_run_all () | WEECHAT_STRING_SPLIT_STRIP_RIGHT | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS, 0, &num_actions); + + script_action_clear (); + if (actions) { for (i = 0; i < num_actions; i++) @@ -1511,8 +1514,6 @@ script_action_run_all () weechat_string_free_split (actions); } - script_action_clear (); - return 1; }