mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed isValidColorArray returning true when array had the right size, but wrong datatypes/value ranges
This commit is contained in:
parent
3e82391a36
commit
a315596c5a
@ -15,6 +15,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
scopeName "main";
|
||||
|
||||
params ["_colorArray"];
|
||||
|
||||
if (isNil "_colorArray") exitWith {false};
|
||||
@ -22,7 +24,7 @@ if ((typeName _colorArray) != "ARRAY") exitWith {false};
|
||||
if (count _colorArray != 4) exitWith {false};
|
||||
|
||||
{
|
||||
if ((typeName _x) != "SCALAR" || _x < 0 || _x > 1) exitWith {false};
|
||||
if ((typeName _x) != "SCALAR" || _x < 0 || _x > 1) exitWith {false breakOut "main"};
|
||||
} count _colorArray;
|
||||
|
||||
true
|
||||
|
Loading…
Reference in New Issue
Block a user