From 396d73ad0cf2f12f2eac1af2ba82ff4878dd78de Mon Sep 17 00:00:00 2001 From: oharboe Date: Wed, 16 Jul 2008 07:22:17 +0000 Subject: better error messages for target event scripts. git-svn-id: svn://svn.berlios.de/openocd/trunk@810 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/command.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/helper/command.c') 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); -- cgit v1.2.3