From 08cd0ff5e18f8438348e876747444b7acb6a4d38 Mon Sep 17 00:00:00 2001 From: Gautier Hattenberger Date: Tue, 16 Aug 2016 18:08:14 +0200 Subject: [PATCH] [ocaml] fix GCS crash when using papgets was due to the use of 'magic' instead of the proper function close #1823 --- sw/lib/ocaml/papget_renderer.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/lib/ocaml/papget_renderer.ml b/sw/lib/ocaml/papget_renderer.ml index 876a16cea50..3ed89378a70 100644 --- a/sw/lib/ocaml/papget_renderer.ml +++ b/sw/lib/ocaml/papget_renderer.ml @@ -59,7 +59,7 @@ object (self) PC.property "color" color ] method update = fun (value : string) -> let renderer = fun x -> - try sprintf (Obj.magic format) (float_of_string x) with _ -> x in + try sprintf (Scanf.format_from_string format "%f") (float_of_string x) with _ -> x in text#set [`SIZE_POINTS size; `TEXT (renderer value); `FILL_COLOR color; `ANCHOR `NW]