diff options
author | Klement Sekera <klement.sekera@gmail.com> | 2024-03-12 18:41:04 +0100 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2024-03-13 07:57:44 +0000 |
commit | e45fac02fde777bbf81f4b22a62c150148457d28 (patch) | |
tree | 739b76dd2815df0f6928dda6ffc53348a1768590 /src/vpp-api/python/vpp_papi | |
parent | ceed1e3b816ebcf103b07e5a2dd004aabb2c4145 (diff) |
papi: use correct size for fixed length strings
This is required for correct packing of unions.
Type: fix
Change-Id: I92d04b1bbcb3fc3fe06474d8f2c59ed3502e6bd6
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Diffstat (limited to 'src/vpp-api/python/vpp_papi')
-rw-r--r-- | src/vpp-api/python/vpp_papi/vpp_serializer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_serializer.py b/src/vpp-api/python/vpp_papi/vpp_serializer.py index d8461398765..d724cb33ce9 100644 --- a/src/vpp-api/python/vpp_papi/vpp_serializer.py +++ b/src/vpp-api/python/vpp_papi/vpp_serializer.py @@ -135,7 +135,7 @@ class String(Packer): def __init__(self, name, num, options): self.name = name self.num = num - self.size = 1 + self.size = num if num else 1 self.length_field_packer = BaseTypes("u32") self.limit = options["limit"] if "limit" in options else num self.fixed = True if num else False |