mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2024-12-22 13:35:37 +00:00
Fix invalid memory access in soundio_sort_channel_layouts()
This commit is contained in:
parent
7c53dabc6e
commit
5ae35e2722
|
@ -733,8 +733,8 @@ const struct SoundIoChannelLayout *soundio_best_matching_channel_layout(
|
|||
}
|
||||
|
||||
static int compare_layouts(const void *a, const void *b) {
|
||||
const struct SoundIoChannelLayout *layout_a = *((struct SoundIoChannelLayout **)a);
|
||||
const struct SoundIoChannelLayout *layout_b = *((struct SoundIoChannelLayout **)b);
|
||||
const struct SoundIoChannelLayout *layout_a = (const struct SoundIoChannelLayout *)a;
|
||||
const struct SoundIoChannelLayout *layout_b = (const struct SoundIoChannelLayout *)b;
|
||||
if (layout_a->channel_count > layout_b->channel_count)
|
||||
return -1;
|
||||
else if (layout_a->channel_count < layout_b->channel_count)
|
||||
|
|
Loading…
Reference in a new issue