diff options
Diffstat (limited to 'src/openocd.c')
-rw-r--r-- | src/openocd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/openocd.c b/src/openocd.c index b36347cd..2d7e7747 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -734,6 +734,9 @@ void add_jim(const char *name, int (*cmd)(Jim_Interp *interp, int argc, Jim_Obj /* FIX!!! it would be prettier to invoke add_help_text... 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); |