mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
remove iffy reliance on type punning that relies on interpreter's behavior
This commit is contained in:
parent
7294bb34be
commit
b473bc48e1
2 changed files with 30 additions and 7 deletions
|
@ -127,13 +127,9 @@ function format_value(value: any) : string
|
|||
|
||||
if ( /^set/ in tn && strstr(tn, ",") == 0 )
|
||||
{
|
||||
# The conversion to set here is tricky and assumes
|
||||
# that the set isn't indexed via a tuple of types.
|
||||
# The above check for commas in the type name
|
||||
# ensures this.
|
||||
local it: set[bool] = value;
|
||||
for ( sv in it )
|
||||
part += cat(sv);
|
||||
local vec = Option::any_set_to_any_vec(value);
|
||||
for ( sv in vec )
|
||||
part += cat(vec[sv]);
|
||||
return join_string_vec(part, ",");
|
||||
}
|
||||
else if ( /^vector/ in tn )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue