mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pod: also check 0 terminted strings in copy_string
Use get_string() to get a pointer to the string in the pod so that we also check if it has a 0 terminator. Fix the test case now that is_string returns true even for non zero-terminated strings.
This commit is contained in:
parent
b991e9acc9
commit
87333537d2
2 changed files with 2 additions and 4 deletions
|
|
@ -286,7 +286,7 @@ PWTEST(pod_init)
|
|||
spa_assert_se(SPA_POD_SIZE(&pod) == 14);
|
||||
spa_assert_se(SPA_POD_TYPE(&pod) == SPA_TYPE_String);
|
||||
spa_assert_se(SPA_POD_BODY_SIZE(&pod) == 6);
|
||||
spa_assert_se(!spa_pod_is_string(&pod.pod.pod));
|
||||
spa_assert_se(spa_pod_is_string(&pod.pod.pod));
|
||||
spa_assert_se(spa_pod_copy_string(&pod.pod.pod, sizeof(val), val) < 0);
|
||||
}
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue