mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 22:03:40 +00:00
Fixed vector of unions crash in java (#5190)
* Fixed vector of unions crash in java * Regenerated test code * Fixed windows tests
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
69d761d15e
commit
8f8fb2b367
@@ -95,7 +95,7 @@ const LanguageParameters &GetLangParams(IDLOptions::Language lang) {
|
||||
"",
|
||||
"import java.nio.*;\nimport java.lang.*;\nimport "
|
||||
"java.util.*;\nimport com.google.flatbuffers.*;\n",
|
||||
"\n@SuppressWarnings(\"unused\")",
|
||||
"\n@SuppressWarnings(\"unused\")\n",
|
||||
"\n@javax.annotation.Generated(value=\"flatc\")\n",
|
||||
{
|
||||
"/**",
|
||||
@@ -1035,6 +1035,8 @@ class GeneralGenerator : public BaseGenerator {
|
||||
? index
|
||||
: lang_.accessor_prefix + "__indirect(" + index + ")";
|
||||
code += ", " + lang_.accessor_prefix + "bb";
|
||||
} else if (vectortype.base_type == BASE_TYPE_UNION) {
|
||||
code += index + " - bb_pos";
|
||||
} else {
|
||||
code += index;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user