Skip to content

Commit

Permalink
Changed maximum force_align to match the C++ code generator.
Browse files Browse the repository at this point in the history
Change-Id: I7df2b0172f5de6f7bdbd8778361794004cd06062
Tested: on Linux.
  • Loading branch information
Wouter van Oortmerssen committed Aug 5, 2015
1 parent 210c0ec commit 45cc503
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/idl_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 45cc503

Please sign in to comment.