mirror of
1
0
Fork 0

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                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This commit is contained in:
Yuri Schaeffer 2021-04-28 15:23:13 +02:00
parent 4e8326ea6c
commit e87fe4cb74
1 changed files with 1 additions and 1 deletions

View File

@ -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: