mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-23 13:24:03 +08:00
[ocaml] dirty fix to avoid segfault of server and GCS
This commit is contained in:
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user