diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2020-02-28 03:05:39 +0100 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2020-02-28 03:48:41 +0100 |
commit | bb754441c8acf70f82c1862a214e74164a403dc1 (patch) | |
tree | efc0e42973d7eb1a6f46adb8c60ed32089db3a52 /gui/treemodel.cc | |
parent | 3e95c57317c8cea5f40a546b8dff9d2b63211611 (diff) | |
download | nextpnr-bb754441c8acf70f82c1862a214e74164a403dc1.tar.gz nextpnr-bb754441c8acf70f82c1862a214e74164a403dc1.tar.bz2 nextpnr-bb754441c8acf70f82c1862a214e74164a403dc1.zip |
gui: Fix undefined behavior in TreeModel.
std::sort() requires the comparison function to return false for even
comparison. Returning true results in undefined behavior and a potential
segfault.
Diffstat (limited to 'gui/treemodel.cc')
-rw-r--r-- | gui/treemodel.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gui/treemodel.cc b/gui/treemodel.cc index 97cc8883..e300c74d 100644 --- a/gui/treemodel.cc +++ b/gui/treemodel.cc @@ -135,7 +135,7 @@ void IdStringList::updateElements(Context *ctx, std::vector<IdString> elements) } // Same string. - return true; + return false; }); } |