aboutsummaryrefslogtreecommitdiff
path: root/src/sst.c
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-12-01 21:37:31 +0000
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-12-01 21:37:31 +0000
commit99f7bb3d39043f74d03b29dc7d6a3f08570c544c (patch)
treed10a545cd97ee4f72f510cd3a3582f6ba3b864a1 /src/sst.c
parent3e057a6365ba6793531ba2930aa53453ee3f0d8e (diff)
downloadsst-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sst.c b/src/sst.c
index 8bdb56c..3ed92ee 100644
--- a/src/sst.c
+++ b/src/sst.c
@@ -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: