diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-22 22:04:41 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-22 22:04:41 +0100 |
commit | 77c279f879ba5c985bbbdb73bdcf95a7baacbd16 (patch) | |
tree | 3fdc505b1371171ea8191daa36be2585b3740f6e /qfunctionconfigurator | |
parent | e7fb0dce334fdb88470aaaaca63c2694cd05f847 (diff) |
don't crash with x=2^31-1
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r-- | qfunctionconfigurator/functionconfig.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp index a0715754..4f808c80 100644 --- a/qfunctionconfigurator/functionconfig.cpp +++ b/qfunctionconfigurator/functionconfig.cpp @@ -45,7 +45,7 @@ float Map::getValueInternal(int x) { if (sz == 0) ret = 0; else - ret = cur.data[std::max(std::min(x, sz-1), 0)]; + ret = cur.data[std::min<unsigned>(x, sz-1)]; return ret * sign; } |