mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Changed maximum force_align to match the C++ code generator.
Change-Id: I7df2b0172f5de6f7bdbd8778361794004cd06062 Tested: on Linux.
This commit is contained in:
@@ -918,10 +918,10 @@ void Parser::ParseDecl() {
|
||||
auto align = static_cast<size_t>(atoi(force_align->constant.c_str()));
|
||||
if (force_align->type.base_type != BASE_TYPE_INT ||
|
||||
align < struct_def.minalign ||
|
||||
align > 256 ||
|
||||
align > 16 ||
|
||||
align & (align - 1))
|
||||
Error("force_align must be a power of two integer ranging from the"
|
||||
"struct\'s natural alignment to 256");
|
||||
"struct\'s natural alignment to 16");
|
||||
struct_def.minalign = align;
|
||||
}
|
||||
struct_def.PadLastField(struct_def.minalign);
|
||||
|
||||
Reference in New Issue
Block a user