From 632b668d44e663de5645ab77827b40cb3f78e477 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Mon, 19 Jan 2015 16:17:43 +0300 Subject: [PATCH] Fixes #9 --- .../libuavcan_dsdl_compiler/data_type_template.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/data_type_template.tmpl b/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/data_type_template.tmpl index 98b15de369..144bd58850 100644 --- a/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/data_type_template.tmpl +++ b/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/data_type_template.tmpl @@ -222,10 +222,12 @@ int ${scope_prefix}<_tmpl>::${call_name}(${self_parameter_type} self, ::uavcan:: % for idx,a in enumerate(fields): res = FieldTypes::${a.name}::${call_name}(self.${a.name}, codec, \ ${'::uavcan::TailArrayOptDisabled' if (idx + 1) < len(fields) else 'tao_mode'}); + % if (idx + 1) < len(fields): if (res <= 0) { return res; } + % endif % endfor return res; }