mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 00:45:47 +00:00
Fix crash on array compare containing absent values (#2039)
This commit is contained in:
parent
917af379a5
commit
549864bf38
1 changed files with 4 additions and 0 deletions
|
|
@ -243,6 +243,10 @@ func eq_b_aa(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
|
|||
// Same-length arrays: return false if any slot is not equal, else true.
|
||||
for i := range a {
|
||||
eq := BIF_equals(a[i], b[i])
|
||||
// Treat invalid comparison as false
|
||||
if eq.Type() == mlrval.MT_ABSENT {
|
||||
return mlrval.FALSE
|
||||
}
|
||||
lib.InternalCodingErrorIf(eq.Type() != mlrval.MT_BOOL)
|
||||
if !eq.AcquireBoolValue() {
|
||||
return mlrval.FALSE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue