Fix overflowing conversion to int in getParameter
This commit is contained in:
+3
-1
@@ -136,7 +136,9 @@ public:
|
||||
currentParameters = parameters;
|
||||
}
|
||||
|
||||
std::string_view getParameter(unsigned int index) {
|
||||
/* This one should take unsigned int, but really high numbers will
|
||||
* overflow as int, so just accept int for now */
|
||||
std::string_view getParameter(/*unsigned */int index) {
|
||||
if (currentParameters.first < (int) index) {
|
||||
return {};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user