From 45cc503bbdad33849c62d11e152fab2f852892db Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Wed, 5 Aug 2015 13:56:31 -0700 Subject: [PATCH] Changed maximum force_align to match the C++ code generator. Change-Id: I7df2b0172f5de6f7bdbd8778361794004cd06062 Tested: on Linux. --- src/idl_parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index bf4b931..ad5ff2a 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -918,10 +918,10 @@ void Parser::ParseDecl() { auto align = static_cast(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); -- 2.7.4