mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-05 18:18:20 +02:00
test: strip all trailing zeroes from the protocol strings
This code worked because the only string we compared against was "ei_connection_setup" which is 19 actual bytes.
This commit is contained in:
parent
2aaf7acdfc
commit
f9446e8c02
1 changed files with 1 additions and 1 deletions
|
|
@ -219,7 +219,7 @@ class Interface:
|
|||
if not s:
|
||||
s = None # zero-length string is None
|
||||
else:
|
||||
s = s.decode("utf8")[:-1] # strip trailing zero
|
||||
s = s.decode("utf8").rstrip("\x00") # strip trailing zeroes
|
||||
results.append(s)
|
||||
else:
|
||||
results.append(values.pop(0))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue