From e87fe4cb74a59ddc39e00f0137c97a76e311487b Mon Sep 17 00:00:00 2001 From: Yuri Schaeffer Date: Wed, 28 Apr 2021 15:23:13 +0200 Subject: [PATCH] Fix alignment issue when using spaces with the separator. For example: ./protocol "pos_x:32, pos_y:32, pos_z:32" 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | pos_x | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | pos_y | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | pos_z | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ --- protocol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol b/protocol index abbed87..c0e9f56 100755 --- a/protocol +++ b/protocol @@ -131,7 +131,7 @@ class Protocol(): raise except: raise ProtocolException("FATAL: Invalid field_list specification (%s)" %spec) - self.field_list.append({"text":text, "len":bits}) + self.field_list.append({"text":text.strip(), "len":bits}) # Parse options if opts is not None: