godbus / dbus

Native Go bindings for D-Bus
BSD 2-Clause "Simplified" License
959 stars 222 forks source link

Fix missing alignment in decodeU() #348

Closed felixonmars closed 1 year ago

felixonmars commented 1 year ago

During refactoring in #344, the newly added decodeU() function skips the dec.align() call from the original decode("u") routine. This unfortunately breaks parsing of boolean values with a lot of the following errors:

dbus: wire format error: invalid value for boolean

Adding a fixed align() call here fixes the problem.

marselester commented 1 year ago

Sorry about introducing a bug. Thank you for fixing it 👍.