Crashes with an empty array
Closed this issue · 4 comments
BrettMayson commented
sqflint is crashing with the line
["acre2$defaultpttkey", []] call EFUNC(common,setkey);
If I change it to not have that empty array, it works just fine.
Using version 0.3.1
rlnt commented
Why would you send an empty array as a parameter to a function?
BrettMayson commented
There are many different use cases for empty arrays.
In the code above it is unbinding a CBA keybind.
Setting a units loadout will most likely have empty arrays in the loadout.
Even just private _array = [];
will cause sqflint to crash.
I can't run sqflint on a third of the files I am working on due to this bug with empty arrays.
LordGolias commented
Duplicate of #38. This is fixed in master branch.
LordGolias commented
I've published a new version of it, 0.3.2, that contains this bug fix. You should be able to pip install it. Hope it helps.