Commit 77b22aed authored by schoetbi's avatar schoetbi Committed by Wouter van Oortmerssen

idl_gen_json_schema.cpp: Fixed detection of enum types (#4438)

parent cc25516d
......@@ -69,7 +69,7 @@ std::string GenType(const std::string &name) {
}
std::string GenType(const Type &type) {
if (type.base_type == BASE_TYPE_CHAR && type.enum_def != nullptr) {
if (type.enum_def != nullptr && !type.enum_def->is_union) {
// it is a reference to an enum type
return GenTypeRef(type.enum_def);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment