mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Check if requested parameters indexes are correct
In case if gcs gets crazy and requests incorrect parameter index
This commit is contained in:
parent
b915e47f33
commit
740121a88e
@ -89,10 +89,12 @@ int parametersCount() {
|
||||
}
|
||||
|
||||
const char *getParameterName(int index) {
|
||||
if (index < 0 || index >= parametersCount()) return "";
|
||||
return parameters[index].name;
|
||||
}
|
||||
|
||||
float getParameter(int index) {
|
||||
if (index < 0 || index >= parametersCount()) return NAN;
|
||||
return *parameters[index].variable;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user