Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
f1bd727f
Commit
f1bd727f
authored
Aug 01, 2014
by
Jonathan Jenkins
Browse files
fix: multiple = lp names in cfg group breaks id calculation
parent
75e90381
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/util/codes_mapping.c
View file @
f1bd727f
...
...
@@ -157,7 +157,7 @@ void codes_mapping_get_lp_id(
}
// does group name match?
if
(
strcmp
(
lpg
->
name
,
group_name
)
==
0
){
tw_lpid
local_
re
p_count
=
0
;
tw_lpid
local_
l
p_count
=
0
;
// for each lp type
for
(
int
l
=
0
;
l
<
lpg
->
lptypes_count
;
l
++
){
const
config_lptype_t
*
lpt
=
&
lpg
->
lptypes
[
l
];
...
...
@@ -171,14 +171,12 @@ void codes_mapping_get_lp_id(
}
else
{
*
gid
+=
(
rep_count
*
(
tw_lpid
)
rep_id
)
+
local_
re
p_count
+
(
tw_lpid
)
offset
;
local_
l
p_count
+
(
tw_lpid
)
offset
;
return
;
}
}
}
else
{
local_rep_count
+=
lpt
->
count
;
}
local_lp_count
+=
lpt
->
count
;
}
// after a group match, short circuit to end if lp not found
goto
ERROR
;
...
...
@@ -193,11 +191,11 @@ ERROR:
tw_error
(
TW_LOC
,
"Unable to find LP id given "
"group
\"
%s
\"
, "
"typename
\"
%s
\"
, "
"annotation
\"
%s
\"
"
,
"annotation
\"
%s
\"
,
"
"repetition %d, and offset %d"
,
group_name
==
NULL
?
"<NULL>"
:
group_name
,
lp_type_name
==
NULL
?
"<NULL>"
:
lp_type_name
,
annotation
==
NULL
?
"<NULL>"
:
annotation
,
group_name
==
NULL
?
"<NULL>"
:
group_name
,
lp_type_name
==
NULL
?
"<NULL>"
:
lp_type_name
,
annotation
==
NULL
?
"<NULL>"
:
annotation
,
rep_id
,
offset
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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