-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Versioning - Handle non-numbers in arrays #401
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,11 @@ PREP(version_check); | |
FUNC(version_compare) = { | ||
private ["_failed", "_c"]; | ||
params ["_value","_localValue"]; | ||
|
||
//Handle non-number arrays - eg. {"mod", {"1.0"}, "(true)"} | ||
if ((!(_value isEqualTo [])) && {!(_value isEqualTypeAll 0)}) exitWith {true}; | ||
if ((!(_localValue isEqualTo [])) && {!(_localValue isEqualTypeAll 0)}) exitWith {true}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably log an error here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And report an error. true -> false There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will return true (true = failed) meaning it will report the dependency as being bad, which should be logged well enough. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Except it's not the dependency that is bad, it's the configuration that is incorrect. |
||
|
||
_failed = false; | ||
_c = count _localValue; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inverted logic?NVM, I get it.