Commit 04baf3fc authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix support for basic SEQUENCE OF type

parent a4ccbcc0
......@@ -226,6 +226,7 @@ def valueNotationToCTypes(gser, dest, sort, ASN1Mod, ASN1_AST, var=None):
'''
if var is None:
var = value.parseString(gser, True)[0]
def reach(field, orig, idx=True):
''' Helper: move native pointer to the next field, and optionaly
index (if idx=True)
......@@ -234,7 +235,7 @@ def valueNotationToCTypes(gser, dest, sort, ASN1Mod, ASN1_AST, var=None):
idx: set to true if you want the index to be reached
'''
split = field.strip(']').split('[')
ptr = getattr(orig, split[0]) if split else orig
ptr = getattr(orig, split[0]) if split and split[0] else orig
if len(split) > 1 and idx:
# SEQOF index
ptr = ptr[int(split[1])]
......
Supports Markdown
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