mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fixing bug with records sometimes unnecessarily coerced on assignment.
This commit is contained in:
parent
1cbde793d8
commit
58f86ae55d
4 changed files with 16 additions and 3 deletions
|
@ -1 +1 @@
|
|||
Subproject commit acf25f34ab48568f5db919c9e3505ed319daa4e5
|
||||
Subproject commit 409bda3a003b18c4736ef168595f20118f4d0038
|
|
@ -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);
|
||||
}
|
||||
|
|
1
testing/btest/Baseline/language.record-ref-assign/output
Normal file
1
testing/btest/Baseline/language.record-ref-assign/output
Normal file
|
@ -0,0 +1 @@
|
|||
XXX, XXX
|
12
testing/btest/language/record-ref-assign.bro
Normal file
12
testing/btest/language/record-ref-assign.bro
Normal file
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue