From 4326a3adced3788c774bf248d64776d730bafe0f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 5 Jun 2016 10:28:02 -0400 Subject: [PATCH] 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 --- scripts/buildcommands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildcommands.py b/scripts/buildcommands.py index 8b9cc9d8..6bb47341 100644 --- a/scripts/buildcommands.py +++ b/scripts/buildcommands.py @@ -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