diff --git a/sw/lib/ocaml/pprz.ml b/sw/lib/ocaml/pprz.ml index 1f0f7af96a..a43150db0e 100644 --- a/sw/lib/ocaml/pprz.ml +++ b/sw/lib/ocaml/pprz.ml @@ -167,6 +167,12 @@ let rec string_of_value = function let magic = fun x -> (Obj.magic x:('a,'b,'c) Pervasives.format) +(* FIXME temporary solution, the complete formatted_string_of_value function + causes a segfault in server and GCS *) +let string_of_value_format = fun format v -> + match v with + Float x -> sprintf (magic format) x + | v -> string_of_value v let rec formatted_string_of_value = fun format v -> match v with @@ -717,7 +723,7 @@ module MessagesOfXml(Class:CLASS_Xml) = struct try List.assoc field_name values with Not_found -> default_value field._type in - formatted_string_of_value field.fformat v) + string_of_value_format field.fformat v) msg.fields) let message_send = fun ?timestamp ?link_id sender msg_name values ->