mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-02 13:27:32 +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)
|
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 ->
|
let rec formatted_string_of_value = fun format v ->
|
||||||
match v with
|
match v with
|
||||||
@@ -717,7 +723,7 @@ module MessagesOfXml(Class:CLASS_Xml) = struct
|
|||||||
try List.assoc field_name values with
|
try List.assoc field_name values with
|
||||||
Not_found ->
|
Not_found ->
|
||||||
default_value field._type in
|
default_value field._type in
|
||||||
formatted_string_of_value field.fformat v)
|
string_of_value_format field.fformat v)
|
||||||
msg.fields)
|
msg.fields)
|
||||||
|
|
||||||
let message_send = fun ?timestamp ?link_id sender msg_name values ->
|
let message_send = fun ?timestamp ?link_id sender msg_name values ->
|
||||||
|
|||||||
Reference in New Issue
Block a user