-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix Zero length check #2765
Fix Zero length check #2765
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 |
---|---|---|
|
@@ -401,7 +401,7 @@ internal override bool AsBoolean() | |
: Array.ConvertAll(_value, x => x.AsByteArray()!); | ||
|
||
private bool IsSingleton => _value?.Length == 1; | ||
private bool IsEmpty => _value?.Length == 0; | ||
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. this changes the value of |
||
private bool IsEmpty => _value == null || _value.Length == 0; | ||
internal override double AsDouble() | ||
{ | ||
if (IsSingleton) return _value![0].AsDouble(); | ||
|
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.
Let's compare using:
outputs:
So... this has no functional change