Commit 06638c58 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

CGenerator: fix SEQUENCE field case handling

When accessing a field of a SEQUENCE (a!bcd in SDL), if bcd uses
uppercase in the ASN.1 modeule (bCD) the code generated by ASN1SCC would
also keep the case. the C backend was not respecting this.
Note: the same problem is probably present elsewhere
parent 2d6c9458
......@@ -1256,7 +1256,13 @@ def _prim_selector(prim):
if receiver_bty.kind == 'ChoiceType':
string = ('{sort}_{field_name}_get({string})'.format(sort=type_name(receiver.exprType), field_name=field_name, string=string))
else:
string += '.' + field_name
# Sequence: we must get the right casing of the field
for field_case in receiver_bty.Children:
if field_case.lower() == field_name.lower():
break
else:
field_case = field_name
string += '.' + field_case
return stmts, unicode(string), local_decl
......
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