summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index 45b66d60..c1eacc00 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -100,6 +100,8 @@ command_t* register_command(command_context_t *context, command_t *parent, char
}
/* accumulate help text in Tcl helptext list. */
Jim_Obj *helptext=Jim_GetGlobalVariableStr(interp, "ocd_helptext", JIM_ERRMSG);
+ if (Jim_IsShared(helptext))
+ helptext = Jim_DuplicateObj(interp, helptext);
Jim_Obj *cmd_entry=Jim_NewListObj(interp, NULL, 0);
Jim_Obj *cmd_list=Jim_NewListObj(interp, NULL, 0);