* gdbtk-variable.c (variable_create): Add parentheses to the name

so that casts do not confuse the expression parser.
This commit is contained in:
Keith Seitz 1999-02-03 21:39:02 +00:00
parent c7fde2d901
commit c951836e48

View file

@ -499,7 +499,14 @@ variable_create (interp, objc, objv)
}
/* Create the variable */
var = create_variable (name, name, pc);
{
/* Add parentheses to the name so that casts do
not confuse it. */
char *newname = (char *) xmalloc (strlen (name) + 2);
sprintf (newname, "(%s)", name);
var = create_variable (name, newname, pc);
FREEIF (newname);
}
if (var != NULL)
{