[ocaml] fix GCS crash when using papgets

was due to the use of 'magic' instead of the proper function
close #1823
This commit is contained in:
Gautier Hattenberger
2016-08-16 18:08:14 +02:00
parent 1d39c29bb4
commit 08cd0ff5e1
+1 -1
View File
@@ -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]