altdesktop / python-dbus-next

🚌 The next great DBus library for Python with asyncio support
https://python-dbus-next.readthedocs.io/en/latest/
MIT License
187 stars 59 forks source link

Fix unmarshaller prefetch align #64

Closed rjarry closed 3 years ago

rjarry commented 3 years ago

When the message header is not a multiple of 8 bytes long, there will be an additional read performed when reading the body since there is an alignment after reading the header. I forgot to take this into account in #62.

I also added a small optimization in padding computing since I needed a separate function to get header padding.

acrisci commented 3 years ago

:+1: