diff options
| author | 2025-12-01 21:37:31 +0000 | |
|---|---|---|
| committer | 2025-12-01 21:37:31 +0000 | |
| commit | 99f7bb3d39043f74d03b29dc7d6a3f08570c544c (patch) | |
| tree | d10a545cd97ee4f72f510cd3a3582f6ba3b864a1 /src/sst.c | |
| parent | 3e057a6365ba6793531ba2930aa53453ee3f0d8e (diff) | |
| download | sst-99f7bb3d39043f74d03b29dc7d6a3f08570c544c.tar.gz sst-99f7bb3d39043f74d03b29dc7d6a3f08570c544c.zip | |
Allow mutating argv in command callbacks and hooks
Diffstat (limited to 'src/sst.c')
| -rw-r--r-- | src/sst.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -466,7 +466,7 @@ enum unload_action { UNLOAD_SELF, UNLOAD_OTHER }; -static int hook_plugin_unload_common(int argc, const char *const *argv) { +static int hook_plugin_unload_common(int argc, const char **argv) { if (argc > 1) { if (!CHECK_AllowPluginLoading(false)) return UNLOAD_SKIP; if (!*argv[1]) { @@ -515,8 +515,8 @@ static int hook_plugin_unload_common(int argc, const char *const *argv) { static void hook_plugin_unload_cbv1() { extern int *_con_argc; - extern const char *(*_con_argv)[80]; - int action = hook_plugin_unload_common(*_con_argc, *_con_argv); + extern const char **_con_argv; + int action = hook_plugin_unload_common(*_con_argc, _con_argv); switch_exhaust_enum(unload_action, action) { case UNLOAD_SKIP: return; @@ -527,7 +527,7 @@ static void hook_plugin_unload_cbv1() { EMIT_PluginUnloaded(); } } -static void hook_plugin_unload_cbv2(const struct con_cmdargs *args) { +static void hook_plugin_unload_cbv2(struct con_cmdargs *args) { int action = hook_plugin_unload_common(args->argc, args->argv); switch_exhaust_enum(unload_action, action) { case UNLOAD_SKIP: |
