TRY_END_PARSE_FLAGS_GENERIC
GitOrigin-RevId: c68a348c7466daa7ab3b6b93217585a18458885d
This commit is contained in:
parent
bc1e26779f
commit
29b807d660
@ -80,7 +80,7 @@ void FileData::parse(ParserT &parser, bool register_file_sources) {
|
||||
PARSE_FLAG(encryption_key_is_secure);
|
||||
PARSE_FLAG(has_sources);
|
||||
PARSE_FLAG(has_version);
|
||||
END_PARSE_FLAGS_GENERIC();
|
||||
TRY_END_PARSE_FLAGS_GENERIC();
|
||||
|
||||
int32 version = 0;
|
||||
if (has_version) {
|
||||
|
@ -57,6 +57,15 @@
|
||||
} \
|
||||
while (false)
|
||||
|
||||
#define TRY_END_PARSE_FLAGS_GENERIC() \
|
||||
CHECK(bit_offset_parse < 31); \
|
||||
if ((flags_parse & ~((1 << bit_offset_parse) - 1)) != 0) { \
|
||||
parser.set_error("invalid flags"); \
|
||||
return; \
|
||||
} \
|
||||
} \
|
||||
while (false)
|
||||
|
||||
namespace td {
|
||||
|
||||
template <class StorerT>
|
||||
|
Loading…
x
Reference in New Issue
Block a user