diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-14 05:51:41 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-14 06:07:46 +0900 |
| commit | 41e5628c67ba566f158fac418790b6e0f8276cd8 (patch) | |
| tree | 0b82b92c8216a66e7be93d457b19dd39e509f1f7 | |
| parent | ffbec828e17da38211e74499fb1fc537ec24bd1a (diff) | |
internal/pipewire: return correct size for nil spa_dict
A nil spa_dict results in a None type value being sent over the wire.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/pipewire/pod.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/pipewire/pod.go b/internal/pipewire/pod.go index 15ff25c3..f8a824cb 100644 --- a/internal/pipewire/pod.go +++ b/internal/pipewire/pod.go @@ -504,8 +504,9 @@ type SPADict []SPADictItem // Size satisfies [KnownSize] with a value computed at runtime. func (d *SPADict) Size() Word { - if d == nil { - return 0 + if *d == nil { + // None type prefix with zero-length body + return SizePrefix } // struct prefix, NItems value |
