Skip to content

Commit

Permalink
[ocaml] fix GCS crash when using papgets
Browse files Browse the repository at this point in the history
was due to the use of 'magic' instead of the proper function
close #1823
  • Loading branch information
gautierhattenberger committed Aug 16, 2016
1 parent 1d39c29 commit 08cd0ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sw/lib/ocaml/papget_renderer.ml
Expand Up @@ -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]


Expand Down

0 comments on commit 08cd0ff

Please sign in to comment.