File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -597,7 +597,7 @@ def get_dynamic_field_length_line(field, query):
597597 if not is_string (f .base_type ):
598598 raise Exception ('Unexpected field {} with type {} has unknown length' .format (f .name , f .base_type ))
599599 # it's a string array!
600- line_to_write = 'length += 4 + val.length ;'
600+ line_to_write = 'length += 4 + _getByteLength( val) ;'
601601 else :
602602 (package , msg_type ) = f .base_type .split ('/' )
603603 samePackage = spec .package == package
@@ -618,7 +618,7 @@ def get_dynamic_field_length_line(field, query):
618618 raise Exception ('Unexpected field {} with type {} has unknown length' .format (f .name , f .base_type ))
619619 # it's a string array!
620620 len_constant_length_fields += 4
621- line_to_write = 'length += object.{}.length ;' .format (f .name )
621+ line_to_write = 'length += _getByteLength( object.{}) ;' .format (f .name )
622622 else :
623623 (package , msg_type ) = f .base_type .split ('/' )
624624 samePackage = spec .package == package
You can’t perform that action at this time.
0 commit comments