buildcommands: Fix max_size calculation

The maximum max_size value should not include MESSAGE_MIN - that is
already added by the runtime code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2016-06-05 10:28:02 -04:00
parent ed103822f5
commit 4326a3adce
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ def build_parser(parser, iscmd, all_param_types):
+ types.count('PT_buffer'))
out += " .num_args=%d," % (num_args,)
else:
max_size = min(msgproto.MESSAGE_MAX
max_size = min(msgproto.MESSAGE_MAX - msgproto.MESSAGE_MIN
, 1 + sum([t.max_length for t in parser.param_types]))
out += " .max_size=%d," % (max_size,)
return out