internal/pipewire: return correct size for nil spa_dict
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m26s
Test / Hakurei (push) Successful in 3m29s
Test / Hpkg (push) Successful in 4m16s
Test / Sandbox (race detector) (push) Successful in 4m25s
Test / Hakurei (race detector) (push) Successful in 5m23s
Test / Flake checks (push) Successful in 1m38s
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m26s
Test / Hakurei (push) Successful in 3m29s
Test / Hpkg (push) Successful in 4m16s
Test / Sandbox (race detector) (push) Successful in 4m25s
Test / Hakurei (race detector) (push) Successful in 5m23s
Test / Flake checks (push) Successful in 1m38s
A nil spa_dict results in a None type value being sent over the wire. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -505,7 +505,8 @@ type SPADict []SPADictItem
|
||||
// Size satisfies [KnownSize] with a value computed at runtime.
|
||||
func (d *SPADict) Size() Word {
|
||||
if d == nil {
|
||||
return 0
|
||||
// None type prefix with zero-length body
|
||||
return SizePrefix
|
||||
}
|
||||
|
||||
// struct prefix, NItems value
|
||||
|
||||
Reference in New Issue
Block a user