diff --git a/aux/btest b/aux/btest index acf25f34ab..409bda3a00 160000 --- a/aux/btest +++ b/aux/btest @@ -1 +1 @@ -Subproject commit acf25f34ab48568f5db919c9e3505ed319daa4e5 +Subproject commit 409bda3a003b18c4736ef168595f20118f4d0038 diff --git a/src/Type.cc b/src/Type.cc index 85e057137f..8048c864d0 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -1504,8 +1504,8 @@ int same_attrs(const Attributes* a1, const Attributes* a2) if ( ! a1 ) return (a2 == 0); - if ( a2 ) - return 0; + if ( ! a2 ) + return (a1 == 0); return (*a1 == *a2); } diff --git a/testing/btest/Baseline/language.record-ref-assign/output b/testing/btest/Baseline/language.record-ref-assign/output new file mode 100644 index 0000000000..4caf2f8fa8 --- /dev/null +++ b/testing/btest/Baseline/language.record-ref-assign/output @@ -0,0 +1 @@ +XXX, XXX diff --git a/testing/btest/language/record-ref-assign.bro b/testing/btest/language/record-ref-assign.bro new file mode 100644 index 0000000000..f71bc3890c --- /dev/null +++ b/testing/btest/language/record-ref-assign.bro @@ -0,0 +1,12 @@ +# @TEST-EXEC: bro %INPUT >output +# @TEST-EXEC: btest-diff output + +type State: record { + host: string &default="NOT SET"; +}; + +global session: State; +global s: State; +s = session; +s$host = "XXX"; +print s$host, session$host;