diff --git a/sw/tools/gen_messages.ml b/sw/tools/gen_messages.ml index 87aafa5e9e..c1788f18cc 100644 --- a/sw/tools/gen_messages.ml +++ b/sw/tools/gen_messages.ml @@ -215,7 +215,7 @@ module Gen_onboard = struct incr offset; (** The macro to access to the array itself *) - fprintf h "#define DL_%s_%s(_payload) ((%s*)_payload+%d)\n" msg_name field_name (Syntax.assoc_types t).Pprz.inttype !offset; + fprintf h "#define DL_%s_%s(_payload) ((%s*)(_payload+%d))\n" msg_name field_name (Syntax.assoc_types t).Pprz.inttype !offset; offset := -1 (** Mark for no more fields *) in