Commit 6cbe0f8a authored by claes's avatar claes

Input size objid and attrrref was to small

parent 62eeaa27
/*
* Proview $Id: wb_wattnav.cpp,v 1.14 2007-01-11 11:40:30 claes Exp $
* Proview $Id: wb_wattnav.cpp,v 1.15 2007-01-15 13:23:17 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -126,7 +126,23 @@ int WAttNav::check_attr( int *multiline, brow_tObject *node,
wnav_attrvalue_to_string( ldhses, item->type_id, p, init_value,
&len);
free( p);
*size = item->size;
switch ( item->type_id) {
case pwr_eType_Objid:
case pwr_eType_AttrRef:
case pwr_eType_ClassId:
*size = sizeof(pwr_tOName) - 1;
break;
case pwr_eType_VolumeId:
case pwr_eType_TypeId:
*size = sizeof(pwr_tObjName) - 1;
break;
case pwr_eType_Time:
case pwr_eType_DeltaTime:
*size = 40;
break;
default:
*size = item->size;
}
if ( item->type_id == pwr_eType_Text)
*multiline = 1;
else
......@@ -153,7 +169,7 @@ int WAttNav::check_attr( int *multiline, brow_tObject *node,
strcpy( name, "");
*init_value = name;
*multiline = 0;
*size = sizeof( name);
*size = sizeof( name) - 1;
*node = ((WItemObjectName *)base_item)->node;
break;
......
/*
* Proview $Id: wb_wnav.cpp,v 1.33 2007-01-11 11:40:30 claes Exp $
* Proview $Id: wb_wnav.cpp,v 1.34 2007-01-15 13:23:45 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -738,7 +738,25 @@ int WNav::check_attr_value( brow_tObject node, int *multiline,
wnav_attrvalue_to_string( ldhses, item->type_id, p, init_value,
&len);
free( p);
*size = item->size;
switch ( item->type_id) {
case pwr_eType_Objid:
case pwr_eType_AttrRef:
case pwr_eType_ClassId:
*size = sizeof(pwr_tOName) - 1;
break;
case pwr_eType_VolumeId:
case pwr_eType_TypeId:
*size = sizeof(pwr_tObjName) - 1;
break;
case pwr_eType_Time:
case pwr_eType_DeltaTime:
*size = 40;
break;
default:
*size = item->size;
}
if ( item->type_id == pwr_eType_Text)
*multiline = 1;
else
......@@ -761,7 +779,24 @@ int WNav::check_attr_value( brow_tObject node, int *multiline,
wnav_attrvalue_to_string( ldhses, item->type_id, p, init_value,
&len);
free( p);
*size = item->size;
switch ( item->type_id) {
case pwr_eType_Objid:
case pwr_eType_AttrRef:
case pwr_eType_ClassId:
*size = sizeof(pwr_tOName) - 1;
break;
case pwr_eType_VolumeId:
case pwr_eType_TypeId:
*size = sizeof(pwr_tObjName) - 1;
break;
case pwr_eType_Time:
case pwr_eType_DeltaTime:
*size = 40;
break;
default:
*size = item->size;
}
if ( item->type_id == pwr_eType_Text)
*multiline = 1;
else
......
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