Commit 1b2a9854 authored by Claes Sjofors's avatar Claes Sjofors

Bugfix in attribute name length

parent b51ca656
......@@ -234,7 +234,7 @@ wb_attribute::wb_attribute(const wb_attribute& pa, int idx, const char *aname) :
{
pwr_tCid cid;
wb_attrname n;
char attrname[120];
pwr_tAName attrname;
if ( !cdh_tidIsCid( pa.tid()) || pa.m_orep == 0)
return;
......
......@@ -40,13 +40,13 @@
wb_attrname::wb_attrname( const char *name)
{
try {
char str[80];
pwr_tOName str;
if ( *name != '.') {
strcpy( str, ".");
strcat( str, name);
strncat( str, name, sizeof(str)-1);
}
else
strcpy( str, name);
strncpy( str, name, sizeof(str));
m_nrep = new wb_nrep( str);
m_sts = LDH__SUCCESS;
m_nrep->ref();
......
......@@ -1788,7 +1788,7 @@ int Nav::get_select( pwr_sAttrRef *attrref, int *is_attr)
brow_tNode *node_list;
int node_count;
Item *item;
pwr_tOName attr_str;
pwr_tAName attr_str;
int sts, size;
brow_GetSelectedNodes( brow_ctx, &node_list, &node_count);
......
......@@ -687,7 +687,7 @@ char *wb_nrep::objectName(const char *n, char *res)
char *wb_nrep::pathName(const char *n, char *res)
{
static char result[80];
static pwr_tOName result;
if ( num_seg <= 1) {
if ( res) {
......@@ -745,7 +745,7 @@ char *wb_nrep::segmentName(const char *n, int idx, char *res)
char *wb_nrep::attributeName(const char *n, int idx, char *res)
{
static char result[80];
static pwr_tOName result;
if ( idx >= num_attr || idx < 0) {
if ( res) {
......@@ -883,7 +883,7 @@ char *wb_nrep::nameName(const char *n, int ntype, char *res)
char *wb_nrep::unatName(const char *name)
{
static char result[80];
static char result[256];
const char *s;
char *su;
......
This diff is collapsed.
......@@ -2669,6 +2669,10 @@ static int graph_grow_cb( GlowCtx *ctx, glow_tEvent event)
sprintf( name, "C%d", grow_IncrNextObjectNameNumber( graph->grow->ctx));
grow_SetObjectName( move_list[i], name);
break;
case glow_eObjectType_GrowGroup:
sprintf( name, "Grp%d_", grow_IncrNextObjectNameNumber( graph->grow->ctx));
grow_SetObjectName( move_list[i], name);
break;
default:
sprintf( name, "O%d", grow_IncrNextObjectNameNumber( graph->grow->ctx));
grow_SetObjectName( move_list[i], name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment