diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-03-08 17:37:24 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-03-08 17:37:24 -0500 |
commit | 969820fba2a353b74d57f6cb76e3a108115391a7 (patch) | |
tree | f2a7b2fb08878c1a5af241b60db1253104007ccd /src/components/channellist/channellisttree.cpp | |
parent | f142df9155b9df0022c38c9420a2e6168f48fd9e (diff) | |
download | abaddon-portaudio-969820fba2a353b74d57f6cb76e3a108115391a7.tar.gz abaddon-portaudio-969820fba2a353b74d57f6cb76e3a108115391a7.zip |
fix overflow in sorting
Diffstat (limited to 'src/components/channellist/channellisttree.cpp')
-rw-r--r-- | src/components/channellist/channellisttree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/channellist/channellisttree.cpp b/src/components/channellist/channellisttree.cpp index 9236031..c26cc24 100644 --- a/src/components/channellist/channellisttree.cpp +++ b/src/components/channellist/channellisttree.cpp @@ -359,7 +359,7 @@ int ChannelListTree::SortFunc(const Gtk::TreeModel::iterator &a, const Gtk::Tree if (a_type == RenderType::TextChannel && b_type == RenderType::VoiceChannel) return -1; if (b_type == RenderType::TextChannel && a_type == RenderType::VoiceChannel) return 1; #endif - return static_cast<int>(a_sort - b_sort); + return static_cast<int>(std::clamp(a_sort - b_sort, -1LL, 1LL)); } void ChannelListTree::OnPanedPositionChanged() { |