Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
c6784b67
Commit
c6784b67
authored
Jan 15, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input size for objid and attrref was to small
parent
8f077a7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
12 deletions
+38
-12
xtt/lib/xtt/src/xtt_xattnav.cpp
xtt/lib/xtt/src/xtt_xattnav.cpp
+38
-12
No files found.
xtt/lib/xtt/src/xtt_xattnav.cpp
View file @
c6784b67
/*
* Proview $Id: xtt_xattnav.cpp,v 1.1
6 2007-01-11 11:40:31
claes Exp $
* Proview $Id: xtt_xattnav.cpp,v 1.1
7 2007-01-15 13:18:00
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -89,6 +89,7 @@ int XAttNav::check_attr( int *multiline, brow_tObject *node, char *name,
brow_tNode
*
node_list
;
int
node_count
;
Item
*
base_item
;
pwr_tStatus
sts
;
*
init_value
=
0
;
*
multiline
=
0
;
...
...
@@ -101,19 +102,44 @@ int XAttNav::check_attr( int *multiline, brow_tObject *node, char *name,
*
node
=
node_list
[
0
];
free
(
node_list
);
switch
(
base_item
->
type
)
{
case
xnav_eItemType_Attr
:
case
xnav_eItemType_AttrArrayElem
:
case
xnav_eItemType_Collect
:
{
ItemBaseAttr
*
item
=
(
ItemBaseAttr
*
)
base_item
;
switch
(
base_item
->
type
)
{
strcpy
(
name
,
item
->
attr
);
return
1
;
case
xnav_eItemType_Attr
:
case
xnav_eItemType_AttrArrayElem
:
case
xnav_eItemType_Collect
:
{
pwr_tTypeId
a_tid
;
pwr_tUInt32
a_size
,
a_offs
,
a_elem
;
ItemBaseAttr
*
item
=
(
ItemBaseAttr
*
)
base_item
;
strcpy
(
name
,
item
->
attr
);
sts
=
gdh_GetAttributeCharacteristics
(
name
,
&
a_tid
,
&
a_size
,
&
a_offs
,
&
a_elem
);
if
(
ODD
(
sts
))
{
switch
(
item
->
type_id
)
{
case
pwr_eType_Objid
:
case
pwr_eType_AttrRef
:
case
pwr_eType_ClassId
:
*
size
=
sizeof
(
pwr_tAName
)
-
1
;
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
=
a_size
/
a_elem
;
}
}
default:
return
XATT__NOCHANGE
;
else
*
size
=
80
;
return
1
;
}
default:
return
XATT__NOCHANGE
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment