diff options
author | schoetbi <schoetbi@users.noreply.github.com> | 2017-09-14 18:25:43 +0200 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2017-09-14 09:25:43 -0700 |
commit | 77b22aed5a13211eddcae214545d014da4b05b20 (patch) | |
tree | 874b9a8d554932711b559de0e977bed9ed8d012d | |
parent | cc25516d3e8e5f058356b8dc263b877ff2b07117 (diff) | |
download | flatbuffers-77b22aed5a13211eddcae214545d014da4b05b20.tar.gz flatbuffers-77b22aed5a13211eddcae214545d014da4b05b20.tar.bz2 flatbuffers-77b22aed5a13211eddcae214545d014da4b05b20.zip |
idl_gen_json_schema.cpp: Fixed detection of enum types (#4438)
-rw-r--r-- | src/idl_gen_json_schema.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/idl_gen_json_schema.cpp b/src/idl_gen_json_schema.cpp index 7f98a6e6..2b673983 100644 --- a/src/idl_gen_json_schema.cpp +++ b/src/idl_gen_json_schema.cpp @@ -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); } |