diff --git a/src/threading/SerialTypes.cc b/src/threading/SerialTypes.cc index 2804706489..223173dbde 100644 --- a/src/threading/SerialTypes.cc +++ b/src/threading/SerialTypes.cc @@ -519,7 +519,8 @@ Val* Value::ValueToVal(const std::string& source, const Value* val, bool& have_e case TYPE_TABLE: { TypeListPtr set_index; - if ( val->val.set_val.size == 0 && val->subtype == TYPE_VOID ) + if ( val->val.set_val.size == 0 && + ( val->subtype == TYPE_VOID || val->subtype == TYPE_ENUM ) ) // don't know type - unspecified table. set_index = make_intrusive(); else diff --git a/testing/btest/Baseline/scripts.base.frameworks.config.missing-enum-value/zeek..stdout b/testing/btest/Baseline/scripts.base.frameworks.config.missing-enum-value/zeek..stdout index c59a7a14f2..44b1fcb93f 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.config.missing-enum-value/zeek..stdout +++ b/testing/btest/Baseline/scripts.base.frameworks.config.missing-enum-value/zeek..stdout @@ -3,3 +3,6 @@ Red, Green } +{ + +} diff --git a/testing/btest/scripts/base/frameworks/config/missing-enum-value.zeek b/testing/btest/scripts/base/frameworks/config/missing-enum-value.zeek index ce1bb0c0ed..6e5aa160ae 100644 --- a/testing/btest/scripts/base/frameworks/config/missing-enum-value.zeek +++ b/testing/btest/scripts/base/frameworks/config/missing-enum-value.zeek @@ -5,6 +5,7 @@ @TEST-START-FILE configfile mycolors Red,asdf,Blue +nocolors @TEST-END-FILE @load base/frameworks/config @@ -12,9 +13,14 @@ mycolors Red,asdf,Blue type Color: enum { Red, Green, Blue, }; option mycolors = set(Red, Green); +option nocolors = set(Red, Green); event zeek_init() { Config::read_config("../configfile"); } event Input::end_of_data(name: string, source:string) - { print mycolors; terminate(); } \ No newline at end of file + { + print mycolors; + print nocolors; + terminate(); + }